Hi everybody !
I'm trying to extend the class ApplicationController with a plugin to
add filters to follow some executions. I don't know why, but I observed
a weird behaviour and I don't know why. Here is my code.
init.rb
=========
require 'myplugin'
myplugin.rb
============
ApplicationController.class_eval do
before_filter do
puts "I'm in the before_filter"
end
end
The things is this filter happens just the first time (the first action
after Webrick is loaded). Well, I tried to do the same thing, extending
ActionController::Base, and it works without problems. But I'd like to
extend ApplicationController and not the Base.
Any ideas ?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.