Commit 4891d3e99ce80fae6c97a3f5859a5fca1d714404

Authored by Rodrigo Souto
1 parent 947607f0

[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.
app/controllers/public/comment_controller.rb
... ... @@ -48,7 +48,7 @@ class CommentController < ApplicationController
48 48 if !@comment.valid? || (not pass_without_comment_captcha? and not verify_recaptcha(:model => @comment, :message => _('Please type the words correctly')))
49 49 respond_to do |format|
50 50 format.js do
51   - render :json => {
  51 + render :json => {
52 52 :render_target => 'form',
53 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 150 end
151 151 end
152 152  
153   - #FIXME make this test
154 153 def check_actions
155 154 comment = profile.comments_received.find(params[:id])
156 155 ids = @plugins.dispatch(:check_comment_actions, comment).collect do |action|
... ...
app/helpers/application_helper.rb
... ... @@ -1387,14 +1387,12 @@ module ApplicationHelper
1387 1387 end
1388 1388  
1389 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 1391 expirable_content_reference content, action, text, url, options
1393 1392 end
1394 1393  
1395 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 1396 expirable_content_reference content, action, text, url, options
1399 1397 end
1400 1398  
... ...