On Feb 12, 2010, at 4:22 AM, Newb Newb wrote:
> Does my below code make sense...is it right?
> <%@profile = UserPrivilege.find_all_by_user_id(4)%>
>
> <%= options_from_collection_for_select(
> Profile.find(:all,
> :conditions => { :id => "#{@profile.map{|s|
> s.profile_id}}" },
> ''id'',
> ''name'')
> %>
What are those other two arguments to find?
Does that help you see where the closing delimiter is missing? ;-)
>
> i get the below error when i run it..
>
> Development/app/views/reports/_list.rhtml:116: syntax error,
> unexpected
> '','', expecting tASSOC
> ...map{|s|
s.profile_id}}"},''id'',''name'')).to_s);
@output_buffer...
>
> /Development/app/views/reports/_list.rhtml:116: syntax error,
> unexpected
> '')'', expecting kEND
> ...ile_id}}"},''id'',''name'')).to_s);
@output_buffer.concat "\n"
>
> Any helps
> --
> Posted via 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 rubyonrails-
> talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> .
> For more options, visit this group at
groups.google.com/group/rubyonrails-talk?hl=en
> .
>
Rob Biedenharn agileconsultingllc.com
Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
groups.google.com/group/rubyonrails-talk?hl=en.