Sha256: 677a2547d06652b6d0ca9f32851ede7956faf5f0c10c88930bde07135df6efef
Contents?: true
Size: 862 Bytes
Versions: 6
Compression:
Stored size: 862 Bytes
Contents
module ActiveResource module Extensions module UrlsWithoutJsonExtension module ClassMethods def element_path_with_extension(*args) element_path_without_extension(*args).gsub(/.json|.xml/,'/') end def new_element_path_with_extension(*args) new_element_path_without_extension(*args).gsub(/.json|.xml/,'/') end def collection_path_with_extension(*args) collection_path_without_extension(*args).gsub(/.json|.xml/,'/') end end def self.included(base) base.class_eval do extend ClassMethods class << self alias_method_chain :element_path, :extension alias_method_chain :new_element_path, :extension alias_method_chain :collection_path, :extension end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems