Skip to content

Commit

Permalink
only public methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Glen committed Dec 3, 2014
1 parent 5a86312 commit b5b6639
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/smithy/liquid/filters/smithy_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ module Filters
module SmithyHelpers
def rails_helper(helper, *args)
options = args_to_options
helper = helper.to_sym
return nil if !controller.view_context.respond_to?(helper)
if options.blank?
controller.view_context.send(helper.to_sym)
controller.view_context.public_send(helper)
else
controller.view_context.send(helper.to_sym, options)
controller.view_context.public_send(helper, options)
end
end

Expand Down

0 comments on commit b5b6639

Please sign in to comment.