Add UserAttribute model, suppose it will store user model want to use which attribute group
This commit is contained in:
1 parent
13065aa85a
commit
9f1de1b543
5 files changed
+32
-3
No files matched your search
+4
-1
@@ -2,7 +2,10 @@ namespace :dev do
|
||||
|
||||
task :build => :environment do
|
||||
User.delete_all
|
||||
User.create!( :email => 'ihower@rulingcom.com', :password => 'password', :password_confirmation => 'password' )
|
||||
User.create!( :email => 'ihower@rulingcom.com', :password => 'password', :password_confirmation => 'password', :use_attributes => ["teacher"] )
|
||||
|
||||
UserAttribute.create!( :ident => "teacher", :name => "Teacher", :attrs => [ "name" => { :type => 'text_field', :width => 100 },
|
||||
"title" => { :type => 'text_field', :width => 100 } ] )
|
||||
|
||||
[Announcement, Item, Snippet, Layout].each { |m| m.delete_all }
|
||||
Layout.create!( :name => 'root', :description => 'root', :content_zh_tw => File.open("#{RAILS_ROOT}/lib/template/root.layout.zh_tw").read,
|
||||
|
||||
Reference in new issue
Block a user