search for: end_of_week

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

2007 Nov 16
1
Missing methods patch for Time::Calculations
Time::Calculations provides methods like "end_of_month", "beginning_of_year" and so on. But it lacks other related methods like "end_of_week" and "end_of_year" that I think should be expected to be there. Here is a patch adding those methods: http://dev.rubyonrails.org/ticket/9312 +1''s? Juanjo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Goog...
2013 Mar 04
0
fields_for with accepts_nested_attributes: how to pass a value to a label
...can''t figure out how to pass a value from the following object build in the controller: class TimesheetsController < AC ... def new @timesheet = current_user.timesheets.new now = Date.today #generating 7 time entries: monday through sunday (now.beginning_of_week..now.end_of_week).step { |date| @timesheet.time_entries.build(:workdate; date) end end ... In the Timesheet model I defined accepts_nested_attributes for time_entries association: class Timesheet < AR has_many :time_entries, :dependent: :destroy accepts_nested_attributes_for :time_entries, reject_if: p...
2009 Jun 07
17
ActiveRecord Classes
I''m having a little trouble with understanding how to work out the schematic for some of my classes using ActiveRecord when a file is in my lib directory: Brief example: Here''s the outline of the files in use: ....app ........controllers ............application_controller.rb ............rushing_offenses_controller.rb ........models ............rushing_offense.rb ....lib