I\'m trying to extend an ActiveRecord model (Vote
) that a gem (https://github.com/peteonrails/vote_fu) provides to my application. (I.e., there is no vote.rb<
I'd try what agmcleod suggested in the comments but instead of putting it in lib, put it in config/initializers/vote.rb:
class Vote
after_create :create_activity_stream_event
has_one :activity_stream_event
def create_activity_stream_event
# something..
end
end
Of course, you could fork the gem, make your modifications and link to your forked version in your Gemfile (that's my preference).