class Key < ActiveRecord::Base class << self def generate (key) Base64.encode64(key) end end end
When calling Key.generate from the controller, it works as expected. However, when I call Key.generate from the Rake :: Task library, I get an error message:
base64 uninitialized constant
user715697
source share