Commit 4891d3e99ce80fae6c97a3f5859a5fca1d714404
1 parent
947607f0
Exists in
master
and in
28 other branches
[comments-refactor-review] Removing obsolete FIXME's
About the FIXME on the helper, I guess it can't hurt to support css class throught the options parameter.
Showing
2 changed files
with
3 additions
and
6 deletions
Show diff stats
app/controllers/public/comment_controller.rb
@@ -48,7 +48,7 @@ class CommentController < ApplicationController | @@ -48,7 +48,7 @@ class CommentController < ApplicationController | ||
48 | if !@comment.valid? || (not pass_without_comment_captcha? and not verify_recaptcha(:model => @comment, :message => _('Please type the words correctly'))) | 48 | if !@comment.valid? || (not pass_without_comment_captcha? and not verify_recaptcha(:model => @comment, :message => _('Please type the words correctly'))) |
49 | respond_to do |format| | 49 | respond_to do |format| |
50 | format.js do | 50 | format.js do |
51 | - render :json => { | 51 | + render :json => { |
52 | :render_target => 'form', | 52 | :render_target => 'form', |
53 | :html => render_to_string(:partial => 'comment_form', :object => @comment, :locals => {:comment => @comment, :display_link => true, :show_form => true}) | 53 | :html => render_to_string(:partial => 'comment_form', :object => @comment, :locals => {:comment => @comment, :display_link => true, :show_form => true}) |
54 | } | 54 | } |
@@ -150,7 +150,6 @@ class CommentController < ApplicationController | @@ -150,7 +150,6 @@ class CommentController < ApplicationController | ||
150 | end | 150 | end |
151 | end | 151 | end |
152 | 152 | ||
153 | - #FIXME make this test | ||
154 | def check_actions | 153 | def check_actions |
155 | comment = profile.comments_received.find(params[:id]) | 154 | comment = profile.comments_received.find(params[:id]) |
156 | ids = @plugins.dispatch(:check_comment_actions, comment).collect do |action| | 155 | ids = @plugins.dispatch(:check_comment_actions, comment).collect do |action| |
app/helpers/application_helper.rb
@@ -1387,14 +1387,12 @@ module ApplicationHelper | @@ -1387,14 +1387,12 @@ module ApplicationHelper | ||
1387 | end | 1387 | end |
1388 | 1388 | ||
1389 | def expirable_button(content, action, text, url, options = {}) | 1389 | def expirable_button(content, action, text, url, options = {}) |
1390 | - #FIXME Leandro see if it's needed the options class parameter | ||
1391 | - options[:class] = "button with-text icon-#{action.to_s}" + (options[:class].nil? ? '' : " " + options[:class]) | 1390 | + options[:class] = ["button with-text icon-#{action.to_s}", options[:class]].compact.join(' ') |
1392 | expirable_content_reference content, action, text, url, options | 1391 | expirable_content_reference content, action, text, url, options |
1393 | end | 1392 | end |
1394 | 1393 | ||
1395 | def expirable_comment_link(content, action, text, url, options = {}) | 1394 | def expirable_comment_link(content, action, text, url, options = {}) |
1396 | - #FIXME Leandro see if it's needed the options class parameter | ||
1397 | - options[:class] = "comment-footer comment-footer-link comment-footer-hide" + (options[:class].nil? ? '' : " " + options[:class]) | 1395 | + options[:class] = ["comment-footer comment-footer-link comment-footer-hide", options[:class]].compact.join(' ') |
1398 | expirable_content_reference content, action, text, url, options | 1396 | expirable_content_reference content, action, text, url, options |
1399 | end | 1397 | end |
1400 | 1398 |