lib/active_admin/generators/boilerplate.rb in activeadmin-1.0.0.pre2 vs lib/active_admin/generators/boilerplate.rb in activeadmin-1.0.0.pre3
- old
+ new
@@ -30,8 +30,16 @@
end
def filter(name)
"# filter :#{name.gsub(/_id$/, '')}"
end
+
+ def form_inputs
+ attributes.reject{|a| %w(id created_at updated_at).include? a}.map{ |a| form_input(a) }.join("\n")
+ end
+
+ def form_input(name)
+ "# f.input :#{name.gsub(/_id$/, '')}"
+ end
end
end
end