Ruby on Rails Sunday, September 28, 2014

On 29 September 2014 05:40, Aspiring.Student.programmer
<sabrina.ncx@gmail.com> wrote:
>
> Hey
>
> I am using the gettting started with rails tutorial on Rails guide
> http://guides.rubyonrails.org/getting_started.html#showing-articles
>
> I am up to session 5.7 Showing articles. I am stuck on this session as i
> have changed my parameters to be strong and all went well. I have defined my
> show method in my controller however, when i link this to the HTML file i
> put this code as seen below however when i run it it shows an error saying
> line 3 .title is undefined. Any advice would be great.
>
> Thanks
>
> <p>
> <strong>Title:</strong>
> <%= @article.title %>
> </p>

Does it say that .title is undefined for nil or for an article object
or what (it is usually a good idea to copy/paste the full error
message here, others may see something significant that you had not
noticed). If it is for nil then you have not setup @article. If it
is for an article object then possibly there is no title column in the
articles table. Perhaps you forgot to run a migration.

Colin

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv%3DU6zjy2S0X3akzzoMc3PgAf0qt6TosVcHO8h0v3V3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment