When I''m making views in Rails I am using my own naming conventions for dom id''s and classes: <div id="posts" class="posts"> <div id="post_23" class="post"> <h2 id="post_23_headline" class="headline">Ruby on Rails</h2> <p id="post_23_content" class="content">Lorem ipsum dolor sit amet.</p> </div> <div id="post_24 class="post"> ... </div> </div> I''ve been trying to Google a little around, trying to find an answer, but are there any official or semi-official naming conventions for id''s and classes in the view out there? Or is it more like a personal preference? -- 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 -~----------~----~----~----~------~----~------~--~---
On Sep 26, 8:04 am, David Trasbo <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> When I''m making views in Rails I am using my own naming conventions for > dom id''s and classes: > > <div id="posts" class="posts"> > <div id="post_23" class="post"> > <h2 id="post_23_headline" class="headline">Ruby on Rails</h2> > <p id="post_23_content" class="content">Lorem ipsum dolor sit > amet.</p> > </div> > <div id="post_24 class="post"> > ... > </div> > </div> > > I''ve been trying to Google a little around, trying to find an answer, > but are there any official or semi-official naming conventions for id''s > and classes in the view out there? >Perhaps you are looking for the dom_id, dom_class, div_for helpers ? Fred> Or is it more like a personal preference? > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:>> � � ... >> � </div> >> </div> >> >> I''ve been trying to Google a little around, trying to find an answer, >> but are there any official or semi-official naming conventions for id''s >> and classes in the view out there? >> > Perhaps you are looking for the dom_id, dom_class, div_for helpers ?These are not conventions. They''re after all just helper methods. But it''s right that they''re keeping some conventions when it comes to naming id''s and classes too. -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---