forms - Active admin not showing all input fields just last one -


i have code inside app/admin/products.rb. have problem can see 1 input field @ time(the last 1 listed) or submit button. because of syntax mistakes ? there no error messages.

activeadmin.register product     f.input :name,:label => "name"    f.input :photo, :as => :file    f.input :category, :collection => @category    f.input :manufacturer, :collection => @manufacturer    f.actions    f.action :submit, :button_html => { :class => "primary", :disable_with => 'wait...' }   end  end end 

product model looks this

 attr_accessible :category_id, :description, :manufacturer_id, :name, :photo   extend friendlyid has_attached_file :photo,  :styles => {    :thumb=> "100x100#",    :large => "290x170",     :medium=> "120x120"}  friendly_id :name, use: [:slugged, :history] belongs_to :manufacturer belongs_to :category 

your form should inside block.

example

activeadmin.register post  form |f|   f.inputs "details"     f.input :title     f.input :published_at, :label => "publish post at"     f.input :category   end   f.inputs "content"     f.input :body   end   f.actions end 

end

here more info http://activeadmin.info/docs/5-forms.html


Comments