Sha256: 1f56a6c33e34e951db844d124ca27e8da0a4ca82db2cc8a45ba4d79c46df7b29

Contents?: true

Size: 618 Bytes

Versions: 12

Compression:

Stored size: 618 Bytes

Contents

module Coprl
  module Presenters
    module Helpers
      module Route
        include Namespace

        def presenters_path(presenter, host: false, **params)
          presenter = _expand_namespace_(presenter, namespace)
          presenter = presenter.gsub(':', '/')
          router.url(render: presenter, host: host, context: params)
        end

        alias presenter_path presenters_path

        # Full qualified URL
        def presenters_url(presenter, **params)
          presenters_path(presenter, host: true, **params)
        end

        alias presenter_url presenters_url
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.6 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.5 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.4 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.3 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.2 lib/coprl/presenters/helpers/route.rb
coprl-3.0.0.beta.1 lib/coprl/presenters/helpers/route.rb