Commit a3b758922c24b4fcff6e3caaf996f705584e3a31

Authored by Victor Costa
1 parent c4617c42

rails3: small fixes

app/controllers/public/content_viewer_controller.rb
... ... @@ -7,6 +7,7 @@ class ContentViewerController < ApplicationController
7 7  
8 8 def view_page
9 9 path = params[:page]
  10 + path = path.join('/') if path.kind_of?(Array)
10 11 path = "#{path}.#{params[:format]}" if params[:format]
11 12 @version = params[:version].to_i
12 13  
... ...
app/helpers/layout_helper.rb
... ... @@ -9,7 +9,7 @@ module LayoutHelper
9 9 end
10 10  
11 11 def noosfero_javascript
12   - plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten
  12 + plugins_javascripts = @plugins.map { |plugin| [plugin.js_files].flatten.map { |js| plugin.class.public_path(js) } }.flatten
13 13  
14 14 output = ''
15 15 output += render :file => 'layouts/_javascript'
... ...
app/models/box.rb
... ... @@ -3,6 +3,8 @@ class Box < ActiveRecord::Base
3 3 acts_as_list :scope => 'owner_id = #{owner_id} and owner_type = \'#{owner_type}\''
4 4 has_many :blocks, :dependent => :destroy, :order => 'position'
5 5  
  6 + attr_accessible :owner
  7 +
6 8 include Noosfero::Plugin::HotSpot
7 9  
8 10 def environment
... ...