Commit 667ef5cfcbdfe4a70028b43f09e1d52b9b136e4f
1 parent
372f1c86
Exists in
master
and in
28 other branches
[tolerance-time] Fixing class due to block call context
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/tolerance_time/lib/tolerance_time_plugin.rb
... | ... | @@ -27,7 +27,7 @@ class ToleranceTimePlugin < Noosfero::Plugin |
27 | 27 | def cms_controller_filters |
28 | 28 | block = lambda do |
29 | 29 | content = Article.find(params[:id]) |
30 | - if self.class.expired?(content) | |
30 | + if ToleranceTimePlugin.expired?(content) | |
31 | 31 | session[:notice] = _('This content can\'t be edited anymore because it expired the tolerance time') |
32 | 32 | redirect_to content.url |
33 | 33 | end |
... | ... | @@ -40,7 +40,7 @@ class ToleranceTimePlugin < Noosfero::Plugin |
40 | 40 | end |
41 | 41 | |
42 | 42 | def content_expire_edit(content) |
43 | - if self.class.expired?(content) | |
43 | + if ToleranceTimePlugin.expired?(content) | |
44 | 44 | _('The tolerance time for editing this content is over.') |
45 | 45 | end |
46 | 46 | end | ... | ... |