>
> I fixed that syntax error 'false' to false but still getting same
> error
>
> You have a nil object when you didn't expect it!
> You might have expected an instance of Array.
> The error occurred while evaluating nil.collect
>
> for
> = select_tag 'subscription',
> options_for_select(@subscription_types.collect {|subscription_type| [
> subscription_type.title, subscription_type.id ] })
>
I think this is something to do with brackets and ruby not being able
to work out what on earth you're trying to say.
You have brackets on your inner method, but not your outer method, so
ruby requires you put brackets all around everything.
This is, at least, my guess.
Try this:
<%= select_tag('subscription',
options_for_select(@subscription_types.collect{|subscription_type|
[subscription_type.title, subscription_type.id]})) %>
Julian.
----------------------------------------------
Learn: http://sensei.zenunit.com/
Last updated 20-May-09 (Rails, Basic Unix)
Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r
> thanks
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---