Sha256: 90cb3a0b799b1f308630fdeba96d1880f676f47d11245cd4d956485563d32ab5

Contents?: true

Size: 387 Bytes

Versions: 13

Compression:

Stored size: 387 Bytes

Contents

module ActiveTools
  module ActionPack
    module ActionView
      module FieldName
        
      end
    end
  end
  
  module OnLoadActionView
    
    def field_name(builder, *args)
      [object_name_to_field_id(builder.object_name), *args].join("_")
    end
  
    def object_name_to_field_id(val)
      val.gsub(/\]\[|[^-a-zA-Z0-9:.]/, "_").sub(/_$/, "")
    end
    
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
active_tools-0.2.5 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.2.4 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.2.3 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.2.2 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.2.1 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.2.0 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.1.4 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.1.3 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.1.2 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.1.1 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.1.0 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.0.52 lib/active_tools/action_pack/action_view/field_name.rb
active_tools-0.0.51 lib/active_tools/action_pack/action_view/field_name.rb