Sha256: e7a303e4036a1647bd1a58fcb5677e410743dd4e31446c4fab0121ad3baac36e

Contents?: true

Size: 360 Bytes

Versions: 50

Compression:

Stored size: 360 Bytes

Contents

module Rao
  module ResourcesController::ResourceInflectionsConcern
    extend ActiveSupport::Concern

    included do
      helper_method :inflections
    end

    private

    def inflections
      {
        resource_name: resource_class.model_name.human(count: 1),
        collection_name: resource_class.model_name.human(count: 2)
      }
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
rao-resources_controller-0.0.12.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.11.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.10.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.9.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.8.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.7.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.6.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.5.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.4.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb
rao-resources_controller-0.0.3.pre app/concerns/rao/resources_controller/resource_inflections_concern.rb