Module: CopyHelper
- Defined in:
- lib/helpers/copy_helper.rb
Instance Method Summary collapse
Instance Method Details
#copy_button(button_name, to_copy_text, html_options) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/helpers/copy_helper.rb', line 3 def (, to_copy_text, ) [:class] = "#{[:class]} zeroclipboard_clip_button" html_attrs = .map{|k, v| "#{k.to_s}=\"#{v.to_s}\"" }.join(" ") #<script type=\"text/javascript\" src=\"zeroclipboard/ZeroClipboard.js\"></script> raw "<a #{html_attrs} data-links=\"#{to_copy_text}\">#{}</a>" end |