Sha256: 700898556a2831f849080311c92b4f64337280a63fc085aa40215e2099329533
Contents?: true
Size: 689 Bytes
Versions: 60
Compression:
Stored size: 689 Bytes
Contents
class InsertAdminUserAndRoles < ActiveRecord::Migration def self.up Role.create(:name=>"Super") Role.create(:name=>"Admin") Role.create(:name=>"User") user = User.create(:email=>"<%= user_email %>", :password=>"<%= user_password %>", :confirmed_at=>DateTime::now, :role=>:super) Profile.create( :first_name => "<%= user_first_name %>", :last_name => "<%= user_last_name %>", :blog_title => "<%= user_blog_title %>", :alias => "<%= user_alias %>", :user => user ) end def self.down User.find_by_email("<%= user_email %>").destroy Role.all.each {|t| t.destroy} end end
Version data entries
60 entries across 60 versions & 1 rubygems