search for: event_d

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

Did you mean: event_id
2008 Dec 06
1
find with add of an atttributes
I have wrote this: EventDate.find(:all, :include => [:container,{:event => [:photo,:event_type_names]},{:place=>:location}], :joins =>" RIGHT JOIN (SELECT event_dates.id,date_add(event_dates.date, INTERVAL i DAY ) AS date FROM (select 0 as i union all select 0 union all select 1 union all select 2) as integers CROSS JOIN event_dates WHERE i<= number_days AND (event_dates.days_of_week=''8'' OR...
2006 May 22
13
How is this possible?
When run from the console, the following code works, when run through the WEBrick server I get a "You have a nil object where you didn''t expect it!" class Competition < ActiveRecord::Base has_many :comp_dates, :order=>:position def initial_date comp_dates.first end def display_dates i_d = initial_date if i_d.nil? return "unknown"
2006 Sep 24
8
form_for and Multiple Models Being Saved
...Has someone else done this? Any quick pointers? Beyond that, a related question. Some of these helpers support the :index option which I believe is designed to differentiate between multiple items of the same type in a form. Something like this: <%= form.text_field :event_city, :index => @event_date.id %> But, for an unsaved item, @event_date.id will be nil so what do folks use to handle this? Any help very much appreciated. Cheers, Hunter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Ra...
2006 May 22
0
Ordering one model class by details contained in another
...ould break the pagination support that the scaffold provided and I don''t currently see a why to make a post-retrieval sort play nice with any pagination scheme I could think of. I tried a rather messy :conditions clausee on the data source for the paginaite, but as it had to use a MIN(event_date) type construct it fell apart unless I switched to a find_by_sql style call which felt inelegant. I''m currently playing with making the aggregation :act_as_list, while adding an ordinal to control the ordering of naturally sortable dates feels a little odd, at least I could right t...
2007 Nov 22
1
has_many :through questions
...t; add_index "attendees", ["person_id"], :name => "index_attendees_on_person_id" create_table "events", :force => true do |t| t.column "name", :string t.column "description", :text t.column "event_date", :date t.column "start_time", :time t.column "end_time", :time t.column "last_register_date", :date t.column "location_city", :string t.column "location_state", :string, :limit => 2...