4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/cornify.rb', line 4
def cornify_link(content=nil, options = {})
attributes = {
:href => "javascript:cornify_add()"
}
if content == :rainbow_madness
attributes[:class] = 'rb-candy'
options = options.merge(attributes)
content = 'Rainbow Madness!!'
hyperlink = content_tag("a", content, options)
(cornify_javascript + cornify_rainbow_button_style + hyperlink).html_safe
else
content ||= 'Click here to Cornify!!'
options = options.merge(attributes)
hyperlink = content_tag("a", content, options)
(cornify_javascript + hyperlink).html_safe
end
end
|