Skip to content

Instantly share code, notes, and snippets.

@helloluis
Created August 8, 2011 09:01
Show Gist options
  • Save helloluis/1131442 to your computer and use it in GitHub Desktop.
Save helloluis/1131442 to your computer and use it in GitHub Desktop.
<p class="<%= @article.toggled? ? "hidden" : "visible" %>">blah</p>
@evansagge
Copy link

p class="#{@article.toggle? ? 'hidden' : 'visible'}"
  | blah

@evansagge
Copy link

p class="#{@article.toggle? ? 'hidden' : 'visible'}" blah

@evansagge
Copy link

simple_form with slim

= simple_form_for [:admin, @post], :html => { :class => 'extra'} do |f|
  = f.error_notification
  .inputs
    = f.input :title, :input_html => { :class => 'extra' }
    = f.input :content, :as => :text, :input_html => { :class => 'extra' }
    = f.input :tags, :input_html => { :class => 'extra' }
  .actions
    = f.button :submit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment