Mephisto edge + Rails edge = no love

After postponing putting up a blog about my many and diverse ruby adventures, i finally sat down for a couple of minutes and put this up. Going through the regular motions of installing mephisto, it all seemed ok until i tried to log into the admin account. Then - disaster ! Mephisto died mercilessly stating that
NoMethodError (undefined method `extract_options_from_args!' for #)
After some grepping i found the function in activerecord base, in an earlier version of rails :
def extract_options_from_args!(args) #:nodoc:
  args.last.is_a?(Hash) ? args.pop : {}
end
The whole thing originates in the acts_as_paranoid plugin, so basically you can either patch that with the function definition, replace the call to the function, or just be a horrible human being and patch your edge rails with the function. Whichever way you choose to take, it should fix the issue.

Later edit
As BradC points out, the intended replacement for extract_options_from_args! is args.extract_options!. As such, replacing line 75 of paranoid.rb to
options = args.extract_options!
would not make you a horrible person, quite on the contrary, it would make you a lovely one !

1 Response to “Mephisto edge + Rails edge = no love”

  1. bradc
    extract_options_from_args! was removed in changeset 7220. To get over the problem, I changed line 75 of paranoid.rb to: options = args.extract_options! I had to restart the server for the change to take effect. Thanks!

Sorry, comments are closed for this article.