Displaying 1 result from an estimated 1 matches for "post_form_without_intercept".
2007 Jun 12
1
alias_method_chain and Class methods (a Ruby question)
...ng the post. I tried the following
in environments/development.rb
module Net
class HTTP
alias_method_chain :post_form, :intercept
def post_form_with_intercept(url, params)
# Do something before post
logger.info(''About to post at #{url}'')
post_form_without_intercept(url, params)
end
end
Unfortunately this complains that there in no method called post_form:
... :NameError: undefined method `post_form'' for class
`Rails::Initializer::Net::HTTP''
I also tried opening the Net module with:
module ::Net
but then I get:
... :Nam...