Class: Moniker::Common
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- Moniker::Common
- Defined in:
- lib/moniker/common.rb
Class Method Summary collapse
-
.collection_path(prefix_options = {}, query_options = nil) ⇒ Object
Overrides ActiveResource::Base::collection_path to remove .<extension> from resources path.
-
.custom_method_collection_url(method_name, options = {}) ⇒ Object
Overrides ActiveResource::CustomMethods to remove .<extension>.
-
.element_path(id, prefix_options = {}, query_options = nil) ⇒ Object
Overrides ActiveResource::Base::element_path to remove .<extension> from resources path.
Methods inherited from Base
Methods inherited from ActiveResource::Base
Class Method Details
.collection_path(prefix_options = {}, query_options = nil) ⇒ Object
Overrides ActiveResource::Base::collection_path to remove .<extension> from resources path
29 30 31 32 33 34 |
# File 'lib/moniker/common.rb', line 29 def self.collection_path( = {}, = nil) () , = () if .nil? "#{prefix()}#{collection_name}#{query_string()}" end |
.custom_method_collection_url(method_name, options = {}) ⇒ Object
Overrides ActiveResource::CustomMethods to remove .<extension>
37 38 39 40 |
# File 'lib/moniker/common.rb', line 37 def self.custom_method_collection_url(method_name, = {}) , = () "#{prefix()}#{collection_name}/#{method_name}#{query_string()}" end |
.element_path(id, prefix_options = {}, query_options = nil) ⇒ Object
Overrides ActiveResource::Base::element_path to remove .<extension> from resources path
21 22 23 24 25 26 |
# File 'lib/moniker/common.rb', line 21 def self.element_path(id, = {}, = nil) () , = () if .nil? "#{prefix()}#{collection_name}/#{URI.parser.escape id.to_s}#{query_string()}" end |