kelredd-useful 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/useful/sinatra_helpers/erb/links.rb +5 -0
- data/lib/useful/version.rb +1 -1
- metadata +1 -1
@@ -13,6 +13,11 @@ module Sinatra
|
|
13
13
|
options.update :href => href
|
14
14
|
tag(:a, options) { content }
|
15
15
|
end
|
16
|
+
|
17
|
+
def open_link_to(content, href, options={})
|
18
|
+
options[:onclick] = "javascript: window.open('#{href}'); return false;"
|
19
|
+
link_to(content, href, options)
|
20
|
+
end
|
16
21
|
|
17
22
|
def mail_link_to(email)
|
18
23
|
link_to email, "mailto: #{email}"
|
data/lib/useful/version.rb
CHANGED