Permalink
Browse files

#1731 incorporating Jasper Kennis's fix for longer class names in str…

…ong_parameters patch
  • Loading branch information...
1 parent 0ba1fb3 commit 98fc1c04f08411d796d3a723fc33c26f28337e46 @garysweaver committed Oct 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/active_admin/strong_parameters_patch.rb
@@ -4,7 +4,7 @@ module StrongParametersPatch
extend ActiveSupport::Concern
def initialize
- @instance_name = active_admin_config.resource_name.downcase
+ @instance_name = active_admin_config.resource_name.gsub(/(.)([A-Z])/,'\1_\2').downcase
@klass = active_admin_config.resource_name.constantize
@column_names = @klass.columns.map do |column|

0 comments on commit 98fc1c0

Please sign in to comment.