Displaying 1 result from an estimated 1 matches for "20090421211825_create_users".
2009 Apr 21
2
problem with sqlite3....
...new to ruby and RoR. I created a simple rails proj named
foo by giving command
-> rails foo --database=sqlite3
It created a new rails proj.. So in that I created a simple db class
named user by using the below command
-> ruby script/generate model user
so in db/migrate I got a file named 20090421211825_create_users.rb
created.
and in app/models : user.rb got created.
in user.rb.. i have written like this
class User < ActiveRecord::Base
validate_uniqueness :userid
validate_presence_of :username
end
in 20090421211825_create_users.rb, its like this
class CreateUsers < ActiveRecord::Migration
def s...