Commit 83e70c2f769c5333ae7c7d1f4cc9ed28a7e0c72a

Authored by LeandroNunes
1 parent 72762e81

ActionItem0: adding plugin

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@139 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/application.rb
... ... @@ -9,9 +9,10 @@ class ApplicationController < ActionController::Base
9 9 before_filter :detect_stuff_by_domain
10 10 attr_reader :virtual_community
11 11  
12   - uses_flexible_template
  12 + uses_flexible_template :owner => 'owner'
13 13  
14 14 def flexible_template_owner
  15 + Profile.find(1)
15 16 end
16 17  
17 18 before_filter :load_template
... ...
app/controllers/edit_template_controller.rb
1 1 class EditTemplateController < ApplicationController
2 2  
3   - uses_flexible_template :edit => true
  3 +# before_filter :leila
  4 + uses_flexible_template :edit => true, :owner => 'owner'
4 5  
5   - def flexible_template_owner
6   - Profile.find(1)
7   - end
  6 +# def leila
  7 +# @owner = Profile.find(1)
  8 +# end
8 9  
9 10 end
... ...
app/controllers/home_controller.rb
1 1 class HomeController < ApplicationController
2 2  
3 3 def index
4   -# render :template => 'home/index'
5 4 end
6 5  
  6 + uses_flexible_template :edit => false, :owner => 'owner'
  7 +
7 8 end
... ...