Skip to content

Commit

Permalink
make sure concat block is eval'd so that deprecation warnings go away
Browse files Browse the repository at this point in the history
  • Loading branch information
vann committed Jan 6, 2009
1 parent 5f23e4c commit 4304134
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/sexy_buttons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ def sexy_buttons(options={}, &block)

tag = options[:tag]
options.delete :tag
concat content_tag(tag, capture(&block), options), block.binding

v_pre_2_1 = "concat(content_tag(tag, capture(&block), options), block.binding)"
v_after_2_1 = "concat(content_tag(tag, capture(&block), options))"

return RAILS_GEM_VERSION.to_f > 2.1 ? eval(v_after_2_1) : eval(v_pre_2_1)
end

def submit(value='',options={})
Expand Down

0 comments on commit 4304134

Please sign in to comment.