Module: Fcid::ActiveResource::Connection::ExtraParams::InstanceMethods
- Defined in:
- lib/fcid/active_resource/extra_params.rb
Instance Method Summary collapse
- #initialize_with_extra_params(*args, &block) ⇒ Object
- #request_with_extra_params(method, path, *arguments) ⇒ Object
Instance Method Details
#initialize_with_extra_params(*args, &block) ⇒ Object
45 46 47 48 |
# File 'lib/fcid/active_resource/extra_params.rb', line 45 def initialize_with_extra_params(*args,&block) @extra_params = {} initialize_without_extra_params *args,&block end |
#request_with_extra_params(method, path, *arguments) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/fcid/active_resource/extra_params.rb', line 50 def request_with_extra_params(method, path, *arguments) unless extra_params.empty? if path =~ /\?/ path += "&" + @extra_params.to_param else path += "?" + @extra_params.to_param end end Rails.logger.debug "request url: #{path}" request_without_extra_params(method,path,*arguments) end |