search for: report_control

Displaying 3 results from an estimated 3 matches for "report_control".

2008 Nov 13
3
Creating a file and saving in public directory
...b class Report < ActiveRecord::Base after_save :write_file def write_file if @file_data File.makedirs("#{RAILS_ROOT}/report") File.open("#{RAILS_ROOT}/report/waiting.adc", "w") { |file| file.write("hello world") } end end end #report_controller.rb def new @report = File.new end def create if @report.save flash[:notice]=''report'' else render :action=>''new'' end end Thank you for your time. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~--...
2008 Apr 11
0
textmate-like autocomplete
I''m using autocomplete fields in my app and it would be nice to have functionality like in textmate where it finds the closest match even if you don''t type it exactly right. For example, to find report_controller.rb in textmate press cmd-T and type repocon. In my app if you type repocon it doesn''t find report_controller.rb because it doesn''t match exactly. I would have to type report_con Curious if anyone has implemented this already and would like to share. -- Chris Barnes http://...
2006 Oct 13
2
Splitting controller
...main controller, but this doesn''t seem to work. controllers/reports/sales_reports.rb: class ReportController < ApplicationController def sales end end controllers/reports/purchases_reports.rb: class ReportController < ApplicationController def purchases end end controllers/report_controller.rb: require ''reports/sales_reports'' require ''reports/purchases_reports'' class ReportController < ApplicationController end This doesn''t seem to work. What I''m doing wrong? --~--~---------~--~----~------------~-------~--~----~ You receive...