I'm trying to define a method inside a migration, but I'm getting an undefined method error:
undefined method 'do_something_specific' for #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x4868018>
I'd rather not define it elsewhere, because it doesn't really relate to the rest of the application, just this specific migration.
To be clear, my migration looks something like:
class DoSomethingSpectacular < ActiveRecord::Migration
def self.up
do_something_specific(1, 2)
end
def self.down
end
private
def do_something_specific(p_1, p_2)
# something happens here...
end
end
Am I missing something here? Why can't I define this like this?