Sha256: 59506fb65a7ad1ad2a047d5e65c44116b8f968c372902d956e54fe90d5032e11
Contents?: true
Size: 480 Bytes
Versions: 5
Compression:
Stored size: 480 Bytes
Contents
# <http://stackoverflow.com/questions/1183506/make-blank-params-nil#1186265>. module Adminos::DomId extend ActiveSupport::Concern module ClassMethods def with_dom_id(*args) options = args.extract_options! identifier_method = options.delete(:identifier_method) || :id define_method :dom_id do @dom_id ||= [ self.class.name.pathalize, self.send(identifier_method).to_s.gsub('-', '_') ].join('_') end end end end
Version data entries
5 entries across 5 versions & 1 rubygems