Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ong_parameters patch
  • Loading branch information...
commit 98fc1c04f08411d796d3a723fc33c26f28337e46 1 parent 0ba1fb3
@garysweaver authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/active_admin/strong_parameters_patch.rb
View
2  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|
Please sign in to comment.
Something went wrong with that request. Please try again.