How to define schema for an ActiveRecord model?
- by Eric Stanton
I can find how to define columns only when doing migrations.
However i do not need to migrate my model.
I want to work with it "virtually".
Does AR read columns data only from db?
Any way to define columns like in DataMapper?
class Post
include DataMapper::Resource
property :id, Serial
property :title, String
property :published, Boolean
end
Now i can play with my model without migrations/connections.