kelredd-useful 0.1.17 → 0.1.18
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 +7 -0
- data/lib/useful/version.rb +1 -1
- metadata +2 -2
@@ -23,6 +23,13 @@ module Sinatra
|
|
23
23
|
link_to email, "mailto: #{email}"
|
24
24
|
end
|
25
25
|
|
26
|
+
def link_to_function(content, function, opts={})
|
27
|
+
opts ||= {}
|
28
|
+
opts[:href] ||= 'javascript: void(0);'
|
29
|
+
opts[:onclick] = "javascript: #{function}; return false;"
|
30
|
+
link_to content, opts[:href], opts
|
31
|
+
end
|
32
|
+
|
26
33
|
# helper to emulate 'image_tag'
|
27
34
|
# EX : image_tag 'logo.jpg'
|
28
35
|
# => <img src="images/logo.jpg" />
|
data/lib/useful/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kelredd-useful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelredd
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-13 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|