I'm presenting a list of items to the user with a field for a new item, like this:
- current_user.tasks.build
- semantic_form_for current_user do |f|
- f.semantic_fields_for :tasks do |t|
- t.inputs do
= t.input :_destroy, :as => :boolean, :label => ''
- if t.object.new_record?
= t.input :name, :label => false
- else
= t.object.name
Which looks lovely and works like a charm. My only problem is I want the new record at the TOP of the list, not the bottom. Is there an elegant and easy way to do this, or am I going to have to do the new element separately, or loop through the list manually?