I have a class User. It was working until... The first few lines
looked like this:
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String, :unique_index => true, :length => 255
...
If I run auto_migrate!, I get this...
[EMAIL PROTECTED] ~/src/ssmerb.git
> dm --merb -e development
DataMapper has been loaded using the 'postgres' database
'ss_development' on 'localhost' as 'postgres'
001:0 dm> User.auto_migrate!
true
All was good. Now I've subclassed User to SS:Model and it looks like
this:
class User < SS::Model
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String, :unique_index => true, :length => 255
...
SS::Model is just a simple class which I intend to use as the
superclass for all/most my models. Currently, it just looks like
this:
module SS
class Model
end
end
Just an empty class at the moment. Not I try to migrate and I get
this:
> dm --merb -e development
DataMapper has been loaded using the 'postgres' database
'ss_development' on 'localhost' as 'postgres'
001:0 dm> User.auto_migrate!
NoMethodError: undefined method `auto_migrate!' for SS::Model:Class
from /Users/jhancock/.gem/ruby/1.8/gems/dm-core-0.9.6/lib/dm-core/
auto_migrations.rb:77:in `auto_migrate_down!'
from /Users/jhancock/.gem/ruby/1.8/gems/dm-core-0.9.6/lib/dm-core/
auto_migrations.rb:63:in `auto_migrate!'
from (irb):1
What's up? Wasn't this sort of thing a problem with dm 0.3? I
thought I should be able to do this by now.
thanks, Jon
http://shellshadow.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---