Sha256: 508ed751488a15e4089eb5da1862dc49641e1395e831a875203d964043a3b40d

Contents?: true

Size: 349 Bytes

Versions: 3

Compression:

Stored size: 349 Bytes

Contents

module ResourcesController
  module ResourceInflections
    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

3 entries across 3 versions & 1 rubygems

Version Path
rails-add_ons-3.0.0.pre1 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-2.2.1 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-2.2.0 app/concerns/resources_controller/resource_inflections.rb