Sha256: 3e9ab58cc3327fb24131bbc93931f714e042a90a91ea4de1fd3d19e6b2c126f7

Contents?: true

Size: 665 Bytes

Versions: 6

Compression:

Stored size: 665 Bytes

Contents

module RemoteResource
  module UrlNaming
    extend ActiveSupport::Concern

    included do
      class_attribute :site, :version, :path_prefix, :path_postfix, :collection_prefix, :collection, :collection_name, instance_accessor: false

      self.collection = false
    end

    module ClassMethods

      def app_host(app, env = 'development')
        CONFIG[env.to_sym][:apps][app.to_sym]
      end

      def base_url
        determined_url_naming.base_url
      end

      def use_relative_model_naming?
        true
      end

      private

      def determined_url_naming
        RemoteResource::UrlNamingDetermination.new self
      end

    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ddy_remote_resource-0.4.11 lib/remote_resource/url_naming.rb
ddy_remote_resource-0.4.10 lib/remote_resource/url_naming.rb
ddy_remote_resource-0.4.9 lib/remote_resource/url_naming.rb
ddy_remote_resource-0.4.8 lib/remote_resource/url_naming.rb
ddy_remote_resource-0.4.7 lib/remote_resource/url_naming.rb
ddy_remote_resource-0.4.6 lib/remote_resource/url_naming.rb