Sha256: 3e2c90aa19066702f4790c942cd71c87e1e0f094418cf5740f3882effbb8f565

Contents?: true

Size: 313 Bytes

Versions: 17

Compression:

Stored size: 313 Bytes

Contents

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rails-add_ons-2.1.1 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-2.1.0 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-2.0.2 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-2.0.1 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-2.0.0 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.5.2 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.5.1 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.5.0 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.4.1 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.4.0 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.3.3 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.3.2 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.3.1 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.3.0 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.2.0 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.1.0 app/concerns/resources_controller/resource_inflections.rb
rails-add_ons-1.0.0 app/concerns/resources_controller/resource_inflections.rb