Commit c86e4879cee472409bb2e8a400d67a7f2a379810
1 parent
ae09bca9
Exists in
master
and in
29 other branches
ActionItem3: VirtualCommunity acts as configurable
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@47 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
5 additions
and
0 deletions
Show diff stats
app/models/virtual_community.rb
... | ... | @@ -3,6 +3,9 @@ class VirtualCommunity < ActiveRecord::Base |
3 | 3 | # One VirtualCommunity can be reached by many domains |
4 | 4 | has_many :domains, :as => :owner |
5 | 5 | |
6 | + # a VirtualCommunity can be configured | |
7 | + acts_as_configurable | |
8 | + | |
6 | 9 | # <tt>name</tt> is mandatory |
7 | 10 | validates_presence_of :name |
8 | 11 | ... | ... |
db/migrate/001_create_virtual_communities.rb
... | ... | @@ -5,9 +5,11 @@ class CreateVirtualCommunities < ActiveRecord::Migration |
5 | 5 | t.column :configuration, :text |
6 | 6 | t.column :is_default, :boolean |
7 | 7 | end |
8 | + ConfigurableSetting.create_table | |
8 | 9 | end |
9 | 10 | |
10 | 11 | def self.down |
12 | + ConfigurableSetting.drop_table | |
11 | 13 | drop_table :virtual_communities |
12 | 14 | end |
13 | 15 | end | ... | ... |