Can I use formtastic with a non-ActiveRecord model?
something like (seems not work):
= semantic_form_for(:non_active_record_model) do |v|
-v.inputs do
.field
=v.input :start_date, :as=> :datepicker
=v.input :end_date, :as => :datepicker
=v.input :name
...
-v.buttons do
=v.save_or_cancel_button("save")
It does work. you need to use semantic_fields_for instead of semantic_form_for.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.