Guest User

Untitled

a guest
Sep 18th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Simple Form: Non object related attribute. How to?
  2. <%= simple_form_for @study,:url => studies_path, :html => { :class => 'form-horizontal' } do |f| %>
  3. <%= f.input :category, :collection => @categories, :label => "Category", :selected => @categories.first %>
  4. <%= f.button :submit, t('add_form'),:class => 'btn-primary' %>
  5.  
  6. <%= simple_form_for @study,:url => studies_path, :html => { :class => 'form-horizontal' } do |f| %>
  7. <%= f.input :category, :collection => @categories, :label => "Category", :selected => @categories.first %>
  8. <%= text_field_tag :blah %>
  9. <%= f.button :submit, t('add_form'),:class => 'btn-primary' %>
  10. <% end %>
Add Comment
Please, Sign In to add comment