On 21 June 2013 20:17,  <[email protected]> wrote:
> Hi everybody!
> I'm currently in the process of writing my first ruby on rails app.  I'm
> quite new to the whole thing and I could use some help with an issue i've
> been stuck on for a while.
>
> The goal here is to crease a discussion board where users can comment with
> microposts.  Very simple.  The issue is that I am getting the error
>
> NameError in Discussions#index
>
> undefined local variable or method `discussion' for
> #<#<Class:0x00000103eb4e08>:0x00000103e78bb0>

You have failed to show us two vital things, firstly which line of
code the error occurs at, look in the server terminal window and you
should see the full message and call stack.  It should tell you which
line of your code is generating the error.  Secondly you have not told
us the relations between the models (has_many, belongs_to etc).  If
you do not understand what that means then I suggest starting with a
good tutorial such as railstutorial.org (free to use online) which
will show you the basics of rails.  In fact I suggest working right
through a tutorial before starting your own app even if you do
understand what I mean.  Also read (and make sure you understand) the
Rails Guides.

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 [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/CAL%3D0gLvDcGMfupG%3DV65GanphsSx3iXv_Y4WQX7txEw6OpEWP%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to