Displaying 2 results from an estimated 2 matches for "create_on".
Did you mean:
created_on
2006 Apr 20
5
Noobie problems with helper
...er.rb:
def format_date(date)
day = to_s(date.day)
month = to_s(date.month)
time = to_s(date.time)
date = day + "/" + month + " - " + time
return date
end
I am trying to call this method in a view like this:
<%= format_date(bounty.created_on) %>
create_on is a timestamp in mysql. I am getting this error:
ArgumentError in Bounties#index
Showing app/views/bounties/list.rhtml where line #14 raised:
wrong number of arguments (1 for 0)
Extracted source (around line #14):
11: <tr>
12: <td><%= bounty.bounty %></td>
13: &...
2006 Jun 13
2
four days on rails - nil object when you didnt expect it
...hile ecaluating nil.strftime
Can someone point out the problem here? I think its right, and I guess
categories is passed through with the right stuff in it, the db has the
field defined, with the following data in it:
+----+----------+---------------------+---------------------+
| id | category | create_on | updated_on |
+----+----------+---------------------+---------------------+
| 1 | test | 2006-06-13 18:33:00 | 2006-06-13 18:33:47 |
| 2 | another | 2006-06-13 18:33:00 | 2006-06-13 18:33:52 |
| 3 | better | 2006-06-13 18:34:00 | 2006-06-13 18:34:43 |
+----+----------+...