Ruby on Rails Friday, April 20, 2012

On 20 April 2012 13:08, Padmoja Roy <poddojaroy@gmail.com> wrote:
> Thanks....I fixed it . But now it's giving me this error-
>
> Trace of template inclusion: app/views/values/new.html.erb
>
> undefined method `radio_button' for nil:NilClass
>
> Extracted source (around line #20):
>
> 17:   </div>
> 18:    <div class="field">
> 19:     <%= f.label :lname %><br />
> 20:     <%= form.radio_button :lname, "yes I have"%> <!-- <label
> id="helper.radio"/> -->

Once again the error is not difficult to see if you look carefully.
The error says undefined method radio_button for something that is nil
and tells you the line. Look at the line, what variable are you
calling radio_button on? What is the value of that variable?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment