Created
April 5, 2013 16:03
-
-
Save amiel/5320486 to your computer and use it in GitHub Desktop.
Hack to undecorate resource for forms. Regarding https://github.com/gregbell/active_admin/issues/2013
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveAdmin | |
module ViewHelpers | |
module FormHelper | |
def active_admin_form_for(resource, options = {}, &block) | |
options = Marshal.load( Marshal.dump(options) ) | |
options[:builder] ||= ActiveAdmin::FormBuilder | |
+ resource = resource.respond_to?(:model) ? resource.model : resource | |
semantic_form_for resource, options, &block | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment