Hi, i'm pretty new to the Rail and Ruby and today I have a problem that I
have to solve (tl;dr: the expert ruby/rails has left our company and now
the newbies like me have to work on the projects that he left). So, let's
go straight:
I have an app running "normally", login function OK, but then when the user
try to reach other sections on the site like this one in the error bellow:
Processing by NewsController#show as HTML
Parameters: {"id"=>"news-alpha-2-3-8"}
Rendered application/_pagetitle.html.haml (0.1ms)
Rendered application/_pagetitle.html.haml (0.0ms)
Rendered news/show.html.haml within layouts/application (2.5ms)
Completed 500 Internal Server Error in 19ms
ActionView::Template::Error (undefined method `name' for nil:NilClass):
9: .pull-right
10: = submit_tag t('news.comment'), class: 'btn btn-primary'
11: .clearfix
12: - unless @item.comments.any?
13: #comment-composer= t('news.no_comments')
14: - else
15: - @comments.each do |comment|
app/views/news/show.html.haml:12:in
`_app_views_news_show_html_haml___3582658555150926440_64556152601540'
And the "undefined method `name' for nil:NilClass" error appears in other
sections as well. If nay of you could explain me why this erros shows up,
because i've double checked the database and these fields are ok, do I have
to check for more specific errors? Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/75143d8d-3c59-4fda-9cab-05e84b90fed4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.