Hi there, I my edit-user-page i have the following code and this works fine. <h4>Kwalificaties</h4> <% for education in Education.find(:all) %> <div> <%= check_box_tag "user[education_ids][]", education.id, @user.educations.include?(education) %> <%= education.name%> <% end %> </div> But now want to display it not in the checkbox but in a normal <li> tag. (no-edit-mode) remco -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Remco Swoany wrote:> Hi there, > > > I my edit-user-page i have the following code and this works fine. > > <h4>Kwalificaties</h4> > <% for education in Education.find(:all) %> > <div> > <%= check_box_tag "user[education_ids][]", education.id, > @user.educations.include?(education) %> > <%= education.name%> > <% end %> > </div> > > But now want to display it not in the checkbox but in a normal <li> tag. > (no-edit-mode) > > remcoDo you just want a list of @user.educations? if so then this should suffice - <ul> <% for education in Education.find(:all) %> <li> <%= education.name%> </li> <% end %> </ul> Is that what you meant? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Max Williams wrote:> Remco Swoany wrote: >> Hi there, >> >> >> I my edit-user-page i have the following code and this works fine. >> >> <h4>Kwalificaties</h4> >> <% for education in Education.find(:all) %> >> <div> >> <%= check_box_tag "user[education_ids][]", education.id, >> @user.educations.include?(education) %> >> <%= education.name%> >> <% end %> >> </div> >> >> But now want to display it not in the checkbox but in a normal <li> tag. >> (no-edit-mode) >> >> remco > > Do you just want a list of @user.educations? if so then this should > suffice - > > <ul> > <% for education in Education.find(:all) %> > <li> <%= education.name%> </li> > <% end %> > </ul> > > Is that what you meant?Nope... I want a list of the items that are selected in the edit-page by the user. remco -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am following the tutorial ''Rolling with Ruby On Instant Rails''. I tried creating the cookbook2 application. It worked the first time. To practice, I tried it three times in total and it worked. Now I am trying it the fourth time and I''ve done it till the step of editing the controller class for ''recipe'' to add the line: scaffold :recipe When I browse to localhost:3000/cookbook2/list I get an error: no route found to match "/cookbook2" with {:method=>:get} I have my Web server running on port 3000. I am sure about that. Please help. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mukesh Singh wrote:> I am following the tutorial ''Rolling with Ruby On Instant Rails''. I > tried creating the cookbook2 application. It worked the first time. > > To practice, I tried it three times in total and it worked. Now I am > trying it the fourth time and I''ve done it till the step of editing > the controller class for ''recipe'' to add the line: > > scaffold :recipe > > When I browse to localhost:3000/cookbook2/list > > I get an error: > > no route found to match "/cookbook2" with {:method=>:get} > > I have my Web server running on port 3000. I am sure about that. > > Please help. >Please exercise patience before posting the same question multiple times in such a short period... unless you posted the same question from different sites thinking that they are different forums. See my answer to your earlier question. Cheers, Mohit. 11/13/2007 | 12:11 AM. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mohit, I''d posted the question first with the title ''Newbie question''. Incidentally, it got tailed with this already existing thread with the same title, so I posted again for visibility. Sorry if it caused you confusion. On Nov 12, 4:11 pm, Mohit Sindhwani <mo_m...-RxrYI66vbj0AvxtiuMwx3w@public.gmane.org> wrote:> Mukesh Singh wrote: > > I am following the tutorial ''Rolling with Ruby On Instant Rails''. I > > tried creating the cookbook2 application. It worked the first time. > > > To practice, I tried it three times in total and it worked. Now I am > > trying it the fourth time and I''ve done it till the step of editing > > the controller class for ''recipe'' to add the line: > > > scaffold :recipe > > > When I browse to localhost:3000/cookbook2/list > > > I get an error: > > > no route found to match "/cookbook2" with {:method=>:get} > > > I have my Web server running on port 3000. I am sure about that. > > > Please help. > > Please exercise patience before posting the same question multiple times > in such a short period... unless you posted the same question from > different sites thinking that they are different forums. > > See my answer to your earlier question. > > Cheers, > Mohit. > 11/13/2007 | 12:11 AM.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---