app/helpers/comable/admin/application_helper.rb in comable-backend-0.7.0.beta1 vs app/helpers/comable/admin/application_helper.rb in comable-backend-0.7.0.beta2

- old
+ new

@@ -29,11 +29,11 @@ if singular? type new_object = f.object.send("build_#{type}") f.send("#{type}_fields", new_object, child_index: "new_#{type}", &render_block) else - new_object = f.object.send(type).build + new_object = Comable.const_get(type.to_s.classify).new f.send('fields_for', type, new_object, child_index: "new_#{type}", &render_block) end end def enable_advanced_search? @@ -42,13 +42,9 @@ value_params = conditions_params.values.first[:v] value_params.values.first[:value].present? rescue NoMethodError false - end - - def page_name - [controller_name, action_name].join(':') end private def singular?(string)