Folks,
I''m using migrations in my app (why wouldn''t you?) but using
the execute
method so that I can layer in check constraints/foreign keys and some
postgres-specific data integrity niceties. Anyway:
Say I want to share methods among migrations, for instance to centralize
column definitions. I have about 15 or so columns in multiple tables
that will be defined with the same check constraints and type, the only
difference being the name.
I guess I''m looking to create helper methods to share amongst all my
migrations. Thoughts?
I''d imagine I''d create a class that has
ActiveRecord::Migration as a
parent, and then put the methods in there and have my migrations inherit
from that. Where would I put this new class?
-DJCP
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---