kelredd-useful 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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" />
@@ -3,7 +3,7 @@ module Useful
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 17
6
+ TINY = 18
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
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.17
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 00:00:00 -07:00
12
+ date: 2009-07-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15