Displaying 4 results from an estimated 4 matches for "time_in".
2006 Jun 13
17
reconstituting a date
In my view code, I have <%= datetime_select "in_out", "time_in" %>
which returns in params
:in_out: !map:HashWithIndifferentAccess
time_in(1i): "2006"
time_in(2i): "6"
time_in(3i): "12"
time_in(4i): "20"
time_in(5i): "24"
and I want to save that datetime to a column in the db......
2006 Jun 24
2
date madness
I have a column called ''time_in'' and it is actually a timestamp so it
has a date and a time.
I created a method in my model called time_in_date which is simply
time_in.strftime("%m/%d/%Y")
I can''t do an sql find on a column that doesn''t exist so how do I find
for a specific date?
Craig
2006 Jun 27
6
embedding ruby code in a [flash :notice]
The ruby code in this isn''t evaluated...
flash[:notice] = "Your last recorded entry was <%= @in_out.time_in %>
<br />You are currently marked as ''In'', you probably want to check
''Out''"
Is there a way?
Craig
2005 Dec 16
3
Help with error
...ct to it
def add_to_project
@project = get_project
@project.find(params[:id])
redirect_to(:action => new_license)
end
new_general.rhtml
-----------------
<%= start_form_tag :action => ''add_to_project'', :id => @project %>
<p>
<label for="time_in">Time in</label>
<br/><%= datetime_select (:general, :time_in) %>
</p>
project.rb
----------
attr_reader :proj_hash
# @items is an array to hold session Objects
def add_item(items)
@proj_hash << items
end