Sha256: 8b29ff7bb97150941fa06fcf0ff1cc5bfddac786afc2d1439e76cbf9abbb49a0

Contents?: true

Size: 152 Bytes

Versions: 8

Compression:

Stored size: 152 Bytes

Contents

module ActiveHashRelation
  module Helpers
    def model_class_name(resource)
      resource.class.to_s.split('::').first.constantize
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active_hash_relation-1.1.0 lib/active_hash_relation/helpers.rb
active_hash_relation-1.0.5 lib/active_hash_relation/helpers.rb
active_hash_relation-1.0.4 lib/active_hash_relation/helpers.rb
active_hash_relation-1.0.3 lib/active_hash_relation/helpers.rb
active_hash_relation-1.0.2 lib/active_hash_relation/helpers.rb
active_hash_relation-1.0.1 lib/active_hash_relation/helpers.rb
active_hash_relation-1.0.0 lib/active_hash_relation/helpers.rb
active_hash_relation-0.0.3 lib/active_hash_relation/helpers.rb