hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-18 13:16 UTC
[ANN] HAML 0.2: The Bomb
---FIRST--- I want to thank everyone for the tremendous response to HAML. I''m absolutely amazed at the sheer number of sites that have switched over to HAML. I am honestly shocked at the emails I get. This started as a passion of mine and has grown into the passion of others. Special thanks for this release goes to Nathan Wiesenbaum who gives new meaning to prolific. ---THE DEAL--- After nearly a 90% code-base rewrite, we find our selves with a new-and-improved HAML... codenamed The Bomb. And its features are ready to *drop*! We have many, many new features available including... - Multi-class Handling - Multi-single-lines with the - character. - Blocks via Silent Scripting - Proper Error Reporting Read all about the new features at: http://hamptoncatlin.com/2006/haml-0-2-the-bomb Or, just update your code off the haml trunk: svn://hamptoncatlin.com/haml/trunk The README file is far more complete now and is almost a tutorial. So, give that a read-through to find new features. -hampton. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Exciting! I read the tantalizing apetizers on your blog and trac site. Can''t wait for the main course to be served. Will the trac tutorial be expanded soon? How does HAML handle if-else-then constructs? I use them to selectively show menu options, for example. <% if current_user.has_permission?(''admin'') %> <%= link_to "admin menu", :controller => "admin", :action => "menu" %> <% else %> <%= link_to "normal menu", :controller => "welcome", :action => "menu" %> <% end %> -Larry On 10/18/06, hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > ---FIRST--- > > I want to thank everyone for the tremendous response to HAML. I''m > absolutely amazed at the sheer number of sites that have switched over > to HAML. I am honestly shocked at the emails I get. This started as a > passion of mine and has grown into the passion of others. Special > thanks for this release goes to Nathan Wiesenbaum who gives new meaning > to prolific. > > ---THE DEAL--- > > After nearly a 90% code-base rewrite, we find our selves with a > new-and-improved HAML... codenamed The Bomb. And its features are ready > to *drop*! > > We have many, many new features available including... > > - Multi-class Handling > - Multi-single-lines with the - character. > - Blocks via Silent Scripting > - Proper Error Reporting > > Read all about the new features at: > > http://hamptoncatlin.com/2006/haml-0-2-the-bomb > > Or, just update your code off the haml trunk: > > svn://hamptoncatlin.com/haml/trunk > > The README file is far more complete now and is almost a tutorial. So, > give that a read-through to find new features. > > -hampton. > > > > >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-18 20:11 UTC
Re: [ANN] HAML 0.2: The Bomb
Ok, thanks (or blames to) silent-scripting, you can convert this to... - if current_user.has_permission?(''admin'') = link_to "admin menu", :controller => "admin", :action => "menu" - else = link_to "normal menu", :controller => "welcome", :action => "menu" But, my personal style-preference is doing this with menus. File: _admin.haml .admin.menu = link_to "admin menu", :controller => "admin", :action => "menu" File: _guest.haml .guest.menu = link_to "normal menu", :controller => "welcome", :action => "menu" Then, do.... = render :partial => (current_user.has_permission?(''admin'') ? ''admin'' : ''guest'') Keeps it a little more D.R.Y. ... and obviously you usually have more than a link-difference in a menu. Though, that''s a personal style-choice. -hampton. Then, back in your o On Oct 18, 12:15 pm, "Larry Kelly" <ldk2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Exciting! I read the tantalizing apetizers on your blog and trac > site. Can''t wait for the main course to be served. Will the trac > tutorial be expanded soon? > > How does HAML handle if-else-then constructs? I use them to > selectively show menu options, for example. > > <% if current_user.has_permission?(''admin'') %> > <%= link_to "admin menu", :controller => "admin", :action => "menu" %> > <% else %> > <%= link_to "normal menu", :controller => "welcome", :action => "menu" %> > <% end %> > -Larry > > On 10/18/06, hcat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hcat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > ---FIRST--- > > > I want to thank everyone for the tremendous response to HAML. I''m > > absolutely amazed at the sheer number of sites that have switched over > > to HAML. I am honestly shocked at the emails I get. This started as a > > passion of mine and has grown into the passion of others. Special > > thanks for this release goes to Nathan Wiesenbaum who gives new meaning > > to prolific. > > > ---THE DEAL--- > > > After nearly a 90% code-base rewrite, we find our selves with a > > new-and-improved HAML... codenamed The Bomb. And its features are ready > > to *drop*! > > > We have many, many new features available including... > > > - Multi-class Handling > > - Multi-single-lines with the - character. > > - Blocks via Silent Scripting > > - Proper Error Reporting > > > Read all about the new features at: > > >http://hamptoncatlin.com/2006/haml-0-2-the-bomb > > > Or, just update your code off the haml trunk: > > > svn://hamptoncatlin.com/haml/trunk > > > The README file is far more complete now and is almost a tutorial. So, > > give that a read-through to find new features. > > > -hampton.-- > Best Regards, > -Larry > "Work, work, work...there is no satisfactory alternative." > --- E.Taft Benson--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the reply. And add a little bit more to my understanding, how would a dropselect tag be written in HAML? Assuming: lookup model = Service ( with id, and name) Current model = Company[service_id] Also, what is the best way to contact you about HAML, is there a mailing list, or is posting to the RubyRails list the best place? Thanks for your help. -Larry On 10/18/06, hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Ok, thanks (or blames to) silent-scripting, you can convert this to... > > > - if current_user.has_permission?(''admin'') > = link_to "admin menu", :controller => "admin", :action => "menu" > - else > = link_to "normal menu", :controller => "welcome", :action => "menu" > > But, my personal style-preference is doing this with menus. > > File: _admin.haml > .admin.menu > = link_to "admin menu", :controller => "admin", :action => "menu" > > File: _guest.haml > .guest.menu > = link_to "normal menu", :controller => "welcome", :action => "menu" > > Then, do.... > > = render :partial => (current_user.has_permission?(''admin'') ? ''admin'' : > ''guest'') > > Keeps it a little more D.R.Y. ... and obviously you usually have more > than a link-difference in a menu. > > Though, that''s a personal style-choice. > > -hampton. > Then, back in your o > > On Oct 18, 12:15 pm, "Larry Kelly" <ldk2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Exciting! I read the tantalizing apetizers on your blog and trac > > site. Can''t wait for the main course to be served. Will the trac > > tutorial be expanded soon? > > > > How does HAML handle if-else-then constructs? I use them to > > selectively show menu options, for example. > > > > <% if current_user.has_permission?(''admin'') %> > > <%= link_to "admin menu", :controller => "admin", :action => "menu" %> > > <% else %> > > <%= link_to "normal menu", :controller => "welcome", :action => "menu" %> > > <% end %> > > -Larry > > > > On 10/18/06, hcat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hcat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > > > ---FIRST--- > > > > > I want to thank everyone for the tremendous response to HAML. I''m > > > absolutely amazed at the sheer number of sites that have switched over > > > to HAML. I am honestly shocked at the emails I get. This started as a > > > passion of mine and has grown into the passion of others. Special > > > thanks for this release goes to Nathan Wiesenbaum who gives new meaning > > > to prolific. > > > > > ---THE DEAL--- > > > > > After nearly a 90% code-base rewrite, we find our selves with a > > > new-and-improved HAML... codenamed The Bomb. And its features are ready > > > to *drop*! > > > > > We have many, many new features available including... > > > > > - Multi-class Handling > > > - Multi-single-lines with the - character. > > > - Blocks via Silent Scripting > > > - Proper Error Reporting > > > > > Read all about the new features at: > > > > >http://hamptoncatlin.com/2006/haml-0-2-the-bomb > > > > > Or, just update your code off the haml trunk: > > > > > svn://hamptoncatlin.com/haml/trunk > > > > > The README file is far more complete now and is almost a tutorial. So, > > > give that a read-through to find new features. > > > > > -hampton.-- > > Best Regards, > > -Larry > > "Work, work, work...there is no satisfactory alternative." > > --- E.Taft Benson > > > > >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-28 19:03 UTC
Re: [ANN] HAML 0.2: The Bomb
Actually, we recently created a google-group called "haml"... so that''s the best place. What kind of select tag do you mean? There are rails helpers for the basic kinds, unless you have some specific need. -hampton. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Nothing special. This is what I had in mind. <table> <tr> <td><%= label_for ''model'', ''attribute'' %></td> <td><%= select ''model'', ''attribute'', @droplist %></td> <tr> </table> Is there a tutorial, and/or a reference for the HAML DSL someplace. I didn''t see anything an the plugin. -Larry On 10/28/06, hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Actually, we recently created a google-group called "haml"... so that''s > the best place. > > What kind of select tag do you mean? There are rails helpers for the > basic kinds, unless you have some specific need. > > -hampton. > > > > >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
There is a file in the Haml trunk called "REFERENCE". Its also one of the documents on the Haml google-group. %table %tr %td= label_for :model, :attribute %td= select :model, :attribute, @droplist That''d be the Haml for that. -hampton. On 10/28/06, Larry Kelly <ldk2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Nothing special. This is what I had in mind. > <table> > <tr> > <td><%= label_for ''model'', ''attribute'' %></td> > <td><%= select ''model'', ''attribute'', @droplist %></td> > <tr> > </table> > > Is there a tutorial, and/or a reference for the HAML DSL someplace. I > didn''t see anything an the plugin. > -Larry > > On 10/28/06, hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Actually, we recently created a google-group called "haml"... so that''s > > the best place. > > > > What kind of select tag do you mean? There are rails helpers for the > > basic kinds, unless you have some specific need. > > > > -hampton. > > > > > > > > > > > > -- > Best Regards, > -Larry > "Work, work, work...there is no satisfactory alternative." > --- E.Taft Benson > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the sample and the reference. My somewhat jaded mind is having a hard time accepting that HAML might just possibly be as easy as it looks. These code samples help a lot. -Larry On 10/29/06, Hampton <hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > There is a file in the Haml trunk called "REFERENCE". Its also one of > the documents on the Haml google-group. > > %table > %tr > %td= label_for :model, :attribute > %td= select :model, :attribute, @droplist > > > That''d be the Haml for that. > > -hampton. > > On 10/28/06, Larry Kelly <ldk2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Nothing special. This is what I had in mind. > > <table> > > <tr> > > <td><%= label_for ''model'', ''attribute'' %></td> > > <td><%= select ''model'', ''attribute'', @droplist %></td> > > <tr> > > </table> > > > > Is there a tutorial, and/or a reference for the HAML DSL someplace. I > > didn''t see anything an the plugin. > > -Larry > > > > On 10/28/06, hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Actually, we recently created a google-group called "haml"... so that''s > > > the best place. > > > > > > What kind of select tag do you mean? There are rails helpers for the > > > basic kinds, unless you have some specific need. > > > > > > -hampton. > > > > > > > > > > > > > > > > > > > -- > > Best Regards, > > -Larry > > "Work, work, work...there is no satisfactory alternative." > > --- E.Taft Benson > > > > > > > > > > >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---