This project is archived and is in readonly mode.
time_ago_in_words reports incorrect number of args, when correct # args used
Reported by MattB | August 18th, 2010 @ 01:05 AM
Rails is reporting an argument error when there isn't one:
ArgumentError in Feed_entries#index
Showing /Users/Caroline/Sites/test_tree/app/views/feed_entries/index.html.erb where line #10 raised:
wrong number of arguments (3 for 1)
Extracted source (around line #10):
7: <p><%= truncate(entry.summary, :length => 300, :omission =>"…") %></p>
8: <% if entry.published_at %>
9: <p>
10: <%= time_ago_in_words(entry.published_at) %>
11: </p>
12: <% end %>
13: <hr>
Rails.root: /Users/Caroline/Sites/test_tree
Application Trace | Framework Trace | Full Trace
app/helpers/application_helper.rb:18:in `distance_of_time_in_words'
app/views/feed_entries/index.html.erb:10:in `block (2 levels) in
It appears to stem from distance_of_time_in_words, as this gives the same error when passed the 3 args it should accept.
Comments and changes to this ticket
-
Andrea Campi October 18th, 2010 @ 06:43 AM
I cannot reproduce this, can you provide a diff demonstrating the issue or at least confirm it's still failing for you?
-
Aditya Sanghi October 18th, 2010 @ 12:19 PM
- Importance changed from to Low
MattB,
Have you overridden some methods in your application_helper.rb? Sharing that would help determine the problem. A part of the stack trace you've pasted shows "app/helpers/application_helper.rb:18:in
distance_of_time_in_words'".
-
Aditya Sanghi October 20th, 2010 @ 09:31 AM
- State changed from new to invalid
Marking invalid until Matt, provides input. I was also not able to reproduce the problem.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>