search for: timeentry

Displaying 5 results from an estimated 5 matches for "timeentry".

2013 Mar 04
2
accepts_nested_attributes: undefined method 'association'_attributes
I have 2 models Timesheet and TimeEntry: class Timesheet < ActiveRecord::Base attr_accessible :status, :user_id, :time_entries_attributes has_many :time_entries, dependent: :destroy accepts_nested_attributes_for :time_entries, :reject_if => proc { |attributes| attributes[''worktime''].blank? } end class Tim...
2013 Mar 30
1
How to use group in nested associations
...ss Activity < AR belongs_to :timesheet, inverse_of: :activities belongs_to :task has_many :time_entries, order: :workdate, dependent: :destroy, inverse_of: :activity accepts_nested_attributes_for :time_entries, allow_destroy: true, reject_if: proc { |a| a[:worktime].blank? } end class TimeEntry < AR belongs_to :activity, :inverse_of => :time_entries end How is it possible to group all the time sheets by their start_date and sum the work time ? Thank you. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsu...
2005 Sep 28
0
search engine, select the selected option
..._name ASC") @geotags = Geotag.find_all_by_firm_id(firm_id, :order =>"address1 ASC") @employee_id = params[:employee][:id].blank? ? '''' : params[:employee][:id] @geotag_id = params[:geotag][:id].blank? ? '''' : params[:geotag][:id] @time_entries = TimeEntry.find(:all, :conditions =>["time_entries.firm_id = ? AND employee_id like ? and geotag_id like ?", firm_id, "%#{@employee_id}%", "%#{@geotag_id}%"], :order => "time_entries.start_time DESC", :include=>[:employee,:geotag])
2006 Sep 20
2
Not receiving form data using form_remote_for
Hi. I''m having a problem that I am sure there is a simple solution for, but I can''t see it. I have the following partial: <% form_for :time_entry, TimeEntry.new, :url => hash_for_time_entries_url(:period => @period, :action => ''new''), :html => { :id => ''time-entry-form'' } do |f| %> <table border="0" cellspacing="0" cellpadding="5" width="100%"> &l...
2006 Nov 04
0
Controller don''t receives form parameters using form_remote_for
Hi. I''m having a problem that I am sure there is a simple solution for, but I can''t see it. I have the following partial: <% form_for :time_entry, TimeEntry.new, :url => hash_for_time_entries_url(:period => @period, :action => ''new''), :html => { :id => ''time-entry-form'' } do |f| %> <table border="0" cellspacing="0" cellpadding="5" width="100%"> &l...