Skip to content

Instantly share code, notes, and snippets.

@qhoxie
Created August 25, 2008 07:59
Show Gist options
  • Save qhoxie/7054 to your computer and use it in GitHub Desktop.
Save qhoxie/7054 to your computer and use it in GitHub Desktop.
## BAD 1
#
# => <p><select label="Language" name="lang"><option val... rather than <label...><select>
%p= text_field :title, :label => "Title"
%p= select :name => 'lang', :collection => @lang_opts, :label => 'Language'
%p= text_area :code, :label => "Code"
%p= text_area :explanation, :label => "Explanation (markdown)"
## BAD 2
#
# => No method error label for Posts (the controller), but only on line 20
%p= text_field :title, :label => "Title"
%p
= select :name => 'lang', :collection => @lang_opts
= label :for => 'lang', :label => 'Language'
%p= text_area :code, :label => "Code"
%p= text_area :explanation, :label => "Explanation (markdown)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment