On Sep 23, 12:30 am, Frederick Cheung <[email protected]>
wrote:
> On Sep 23, 4:38 am, Thufir <[email protected]> wrote:
>
> > Interestingly, the text book
>
> > Practical Ruby Gemshttp://www.apress.com/book/view/9781590598115
> > listing 5-1
>
> > uses ActiveRecord::Base wheras ActiveRecord::Migration would give more
> > flexibility, right?
>
> I imagine they are just showing you that there is more than one way to
> do things.
>
>
>
> > How would I implement this change, pls?
>
> Which change ?
What I mean is, if it's
class Items < ActiveRecord::Migration
then there cannot be a query as below:
claims = Items.find( :all)
Or, I suppose you don't query in that fashion, as the migration file
will basically just have self.up and down (for me). How is the
migration in AR linked to the Base class, which is queriable, in a non-
rails scenario?
I suppose the driver will invoke the migration, but how is the
migration tied to the model (the Item class, versus Items the
migration)?
thanks,
Thufir
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---