Displaying 3 results from an estimated 3 matches for "_report".
Did you mean:
report
2006 Mar 19
1
Question on creating a report
...;'t seem quite "Rails".
I created two methods in a controller, one called "report" that was empty:
def report
end
that would just then display the report.rhtml page. This page
contained a form tag with a text box and a submit button. This form
then submitted to a "do_report" method in the controller:
def do_report
teams = ..... etc
end
This then displayed a do_report.rhtml which formatted the output.
I thought I would try to streamline it a bit, and moved the code in
do_report into the report method, and had the and had the form submit
directly to the "...
2010 Jan 03
2
Problem with downloading a generated Excel sheet
Hello,
I''m using the spreadsheet/excel gem to generate an excel sheet that I
want user to be able to download it once it''s generated. Please take a
look on the below code:
@contacts=Contact.find(:all)
if @contacts.size>0
file="#{Date.today}_Report.xls"
workbook=Spreadsheet::Excel.new("#{RAILS_ROOT}/public/reports/#{file}")
worksheet=workbook.add_worksheet("All Users on Database")
worksheet.write(0, 0, "First Name")
worksheet.write(0, 1, "Last Name")
workshe...
2008 Aug 31
9
assigning collection values and exceptions
hi everyone,
I''ve this code in my Report model:
has_many :report_reasons, :validate => true
has_many :reasons, :through => :report_reasons #, :uniq => true
# :accessible => true
def reason_attributes=(reason_attributes)
reasons.clear
reason_attributes.uniq.each do |reason|
reasons << Reason.find_or_create_by_content(reason)
end
end