Sha256: 6d7502ef7a09bf38e05aba416bbb95198a223751fef2e9be283e9a04b2b0b398

Contents?: true

Size: 419 Bytes

Versions: 8

Compression:

Stored size: 419 Bytes

Contents

module ServiceController::RestServiceUrls
  extend ActiveSupport::Concern

  included do
    helper_method :new_service_path,
                  :create_service_path
  end

  def new_service_path
    resource_router.send(:url_for, { action: :new, only_path: true })
  end

  def create_service_path
    resource_router.send(:url_for, { action: :create, only_path: true })
  end

  def resource_router
    self
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails-add_ons-3.0.0.pre1 app/concerns/service_controller/rest_service_urls.rb
rails-add_ons-2.2.1 app/concerns/service_controller/rest_service_urls.rb
rails-add_ons-2.2.0 app/concerns/service_controller/rest_service_urls.rb
rails-add_ons-2.1.1 app/concerns/service_controller/rest_service_urls.rb
rails-add_ons-2.1.0 app/concerns/service_controller/rest_service_urls.rb
rails-add_ons-2.0.2 app/concerns/service_controller/rest_service_urls.rb
rails-add_ons-2.0.1 app/concerns/service_controller/rest_service_urls.rb
rails-add_ons-2.0.0 app/concerns/service_controller/rest_service_urls.rb