Commit 72762e81c5f45bf7e941858575401e74014b93a5
1 parent
fdb22713
Exists in
master
and in
29 other branches
ActionItem0: refactoring block plugins
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@138 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
17 additions
and
3 deletions
Show diff stats
app/controllers/application.rb
... | ... | @@ -9,7 +9,10 @@ class ApplicationController < ActionController::Base |
9 | 9 | before_filter :detect_stuff_by_domain |
10 | 10 | attr_reader :virtual_community |
11 | 11 | |
12 | - uses_manage_template :edit => false | |
12 | + uses_flexible_template | |
13 | + | |
14 | + def flexible_template_owner | |
15 | + end | |
13 | 16 | |
14 | 17 | before_filter :load_template |
15 | 18 | # Load the template belongs to a Profile and set it at @chosen_template variable. | ... | ... |
app/controllers/edit_template_controller.rb
app/models/profile.rb
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | # which by default is the one returned by VirtualCommunity:default. |
4 | 4 | class Profile < ActiveRecord::Base |
5 | 5 | |
6 | + act_as_flexible_template | |
7 | + | |
6 | 8 | # Valid identifiers must match this format. |
7 | 9 | IDENTIFIER_FORMAT = /^[a-z][a-z0-9_]+[a-z0-9]$/ |
8 | 10 | |
... | ... | @@ -16,7 +18,6 @@ class Profile < ActiveRecord::Base |
16 | 18 | ] |
17 | 19 | |
18 | 20 | has_many :domains, :as => :owner |
19 | - has_many :boxes, :as => :owner | |
20 | 21 | belongs_to :virtual_community |
21 | 22 | belongs_to :user |
22 | 23 | ... | ... |