Commit 46a4526be26a1b5b0c66c56e3681b26da28b8445
Committed by
Tallys Martins
1 parent
938cbff3
Exists in
master
and in
27 other branches
rails3: Fixing mass assignment on publish_submissions attribute.
Showing
3 changed files
with
6 additions
and
3 deletions
Show diff stats
plugins/work_assignment/lib/work_assignment_plugin.rb
@@ -34,7 +34,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin | @@ -34,7 +34,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin | ||
34 | !content.profile.members.include?(context.send(:user)) | 34 | !content.profile.members.include?(context.send(:user)) |
35 | end | 35 | end |
36 | end | 36 | end |
37 | -=begin | 37 | + |
38 | def content_viewer_controller_filters | 38 | def content_viewer_controller_filters |
39 | block = proc do | 39 | block = proc do |
40 | path = params[:page].join('/') | 40 | path = params[:page].join('/') |
@@ -50,7 +50,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin | @@ -50,7 +50,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin | ||
50 | :options => {:only => 'view_page'}, | 50 | :options => {:only => 'view_page'}, |
51 | :block => block } | 51 | :block => block } |
52 | end | 52 | end |
53 | -=end | 53 | + |
54 | def upload_files_extra_contents | 54 | def upload_files_extra_contents |
55 | proc do | 55 | proc do |
56 | render :partial => 'work_assignment_form', :locals => { :size => '45'} | 56 | render :partial => 'work_assignment_form', :locals => { :size => '45'} |
plugins/work_assignment/lib/work_assignment_plugin/work_assignment.rb
@@ -3,6 +3,9 @@ class WorkAssignmentPlugin::WorkAssignment < Folder | @@ -3,6 +3,9 @@ class WorkAssignmentPlugin::WorkAssignment < Folder | ||
3 | settings_items :publish_submissions, :type => :boolean, :default => false | 3 | settings_items :publish_submissions, :type => :boolean, :default => false |
4 | settings_items :email_notification, :type => :boolean, :default => false | 4 | settings_items :email_notification, :type => :boolean, :default => false |
5 | 5 | ||
6 | + attr_accessible :publish_submissions | ||
7 | + attr_accessible :email_notification | ||
8 | + | ||
6 | def self.icon_name(article = nil) | 9 | def self.icon_name(article = nil) |
7 | 'work-assignment' | 10 | 'work-assignment' |
8 | end | 11 | end |
plugins/work_assignment/views/cms/work_assignment_plugin/_work_assignment.html.erb
1 | <%= render :partial => 'folder', :locals => {:f => f} %> | 1 | <%= render :partial => 'folder', :locals => {:f => f} %> |
2 | 2 | ||
3 | -<%#labelled_check_box(_('Publish submissions'), 'article[publish_submissions]', true, @article.publish_submissions) %> | 3 | +<%=labelled_check_box(_('Publish submissions'), 'article[publish_submissions]', true, @article.publish_submissions) %> |