Displaying 4 results from an estimated 4 matches for "starts_at".
Did you mean:
start_at
2006 Mar 21
5
Use select_date for my model?
Hi all
I have a model "party" that has a time field "starts_at". I have created
a form to add new instances of this model.
<%= select_date Date.today, :prefix => ''party'' %>
Sadly I get the error:
NoMethodError in Parties#add
undefined method `month='' for #<Party:0x256a600>
How can I fix this problem? I rememb...
2011 Aug 06
7
Accessing datetime elements from hash passed to method
I''m passing hash (called ''params'') to a method. Some keys (one of them
is called ''starts_at'') in that hash have date as a value (taken from
datetime_select helper). I want to access the date elements like date
only or time only but I''m just out of ideas.
def self.new_meeting(params)
str = params[''starts_at(1i)'']
puts str
end
This returns n...
2006 Apr 07
2
Access instance variables from model?
Can I make my model methods aware of the context (preferably instance
variables) where they are run, without having to pass them arguments?
The app in question should be time zone aware, so something like
user.events[0].starts_in should check against @logged_in_user.now rather
than Time.now.
I could send the user as an argument
(user.events[0].starts_in(:timezoned => @logged_in_user)),
2006 Jan 20
47
SQL Server datetime error
...n, so i translated it -- i get:
DBI::DatabaseError: Execute
OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server
Couldn''t convert a char-Datatype to datetime
HRESULT error code:0x80020009
Exception occured.: INSERT INTO projects ([updated_at], [title],
[starts_at], [description], [ends_at], [created_at]) VALUES(''2006-01-20
15:23:40'', ''title'', ''2006-01-20 15:23:00'', ''description'', ''2006-01-20
15:23:00'', ''2006-01-20 15:23:00'')
--
Posted via http://w...