Sorry, I thought this forum could understand Textile...
Here we go again:
Hi,
I've used ROR in the past,
but recently started working with version 2.2.
I don't seem to be able to get started:
1/ I create a rails app: rails music_library
2/ I create a db using an SQlite gui: music_library_DB.rsd
3/ I edit the config/database.yml file:
development:
adapter: sqlite3
database: db/music_library_DB.rsd
pool: 5
timeout: 5000
4/I run script/generate scaffold Album
5/I run rake db:migrate
Afterwards, I run script/generate migration columns, so I can add
columns to the albums DB table:
class Columns < ActiveRecord::Migration
def self.up
drop_table :albums
create_table :albums do |t|
t.string :title, :artist, :genre
t.datetime :releasedate
t.timestamps
end
end
def self.down
drop_table :albums
end
end
I run rake db:migrate again, to execute the migration
And here's my question:
How do I update the scaffolding, so I can use CRUD to add albums, ...
--
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 [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
-~----------~----~----~----~------~----~------~--~---