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"/> -->
21: <%= form.label :red %>
22: <%= form.radio_button :lname, "No I don't"%>
23: <%= form.label :yellow %>
Trace of template inclusion: app/views/values/new.html.erb
Rails.root: /home/vmuser/workspace/trial-9
Application Trace | Framework Trace | Full Trace
app/views/values/_form.html.erb:20:in `block in
_app_views_values__form_html_erb__544020744__641603598'
app/views/values/_form.html.erb:1:in
`_app_views_values__form_html_erb__544020744__641603598'
app/views/values/new.html.erb:3:in
`_app_views_values_new_html_erb__132110805__641585578'
app/controllers/values_controller.rb:31:in `new'
On Apr 20, 3:45 am, Colin Law <clan...@googlemail.com> wrote:
> On 19 April 2012 22:07, Padmoja Roy <poddoja...@gmail.com> wrote:
>
> > ...
> > Showing /home/vmuser/workspace/trial-9/app/views/values/_form.html.erb
> > where line #22 raised:
>
> > /home/vmuser/workspace/trial-9/app/views/values/_form.html.erb:22:
> > syntax error, unexpected tIDENTIFIER, expecting ')'
> > ...adio_button :lname, 'No I don't' );@output_buffer.safe_conca...
>
> Surely you can see the error here, you have single quote character in
> the middle of a string using single quote to identify it. Ruby will
> see the string as 'No I don' and is then confused by the t character.
> Use "No I don't" instead.
>
> 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