Skip to content

Commit

Permalink
Fix undefined method `tag_options' in Rails 5.1.
Browse files Browse the repository at this point in the history
Rails 5.1 moved tag_options() to ActionView::Helpers::TagBuilder.
  • Loading branch information
bfabio committed May 22, 2017
1 parent f065b91 commit efa58c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/wice/wice_grid_core_ext.rb
Expand Up @@ -113,7 +113,12 @@ module ActionView #:nodoc:
module Helpers #:nodoc:
module TagHelper #:nodoc:
def public_tag_options(options, escape = true) #:nodoc:
tag_options(options, escape)
if respond_to?(:tag_options)
tag_options(options, escape)
# Rails 5.1 uses TagBuilder
else
tag_builder.tag_options(options, escape)
end
end
end
end
Expand Down

0 comments on commit efa58c5

Please sign in to comment.