jqr-helpers 1.0.8 → 1.0.9

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.
data/jqr-helpers.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jqr-helpers'
3
3
  s.require_paths = %w(. lib lib/jqr-helpers)
4
- s.version = '1.0.8'
4
+ s.version = '1.0.9'
5
5
  s.date = '2013-11-19'
6
6
  s.summary = 'Helpers to print unobtrusive jQuery-UI tags.'
7
7
  s.description = <<-EOF
@@ -29,7 +29,7 @@ module JqrHelpers
29
29
  else
30
30
  options = url_or_options
31
31
  content = yield
32
- id = _random_string
32
+ id = Helpers._random_string
33
33
  url = '#' + id
34
34
  end
35
35
  options.merge!(:id => id)
@@ -138,7 +138,8 @@ module JqrHelpers
138
138
  end
139
139
 
140
140
  html_options[:'data-dialog-url'] = url
141
- link_to_dialog(_random_string, html_content, dialog_options, html_options)
141
+ link_to_dialog(Helpers._random_string, html_content,
142
+ dialog_options, html_options)
142
143
  end
143
144
 
144
145
  # Same as button_to_dialog, but loads content from a remote URL instead of
@@ -298,6 +299,12 @@ module JqrHelpers
298
299
  content_tag(:div, raw(content), html_options)
299
300
  end
300
301
 
302
+ # Generate a random string for IDs.
303
+ # @return [String]
304
+ def self._random_string
305
+ SecureRandom.hex(16)
306
+ end
307
+
301
308
  private
302
309
 
303
310
  # @param format [String] the Rails date format to map
@@ -342,12 +349,6 @@ module JqrHelpers
342
349
 
343
350
  end
344
351
 
345
- # Generate a random string for IDs.
346
- # @return [String]
347
- def _random_string
348
- SecureRandom.hex(16)
349
- end
350
-
351
352
  # Process options related to Ajax requests (e.g. button_to_ajax).
352
353
  # @param options [Hash]
353
354
  # @return [Hash] HTML options to inject.
@@ -1,5 +1,5 @@
1
1
  module JqrHelpers
2
2
  module Rails
3
- VERSION = '1.0.8'
3
+ VERSION = '1.0.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jqr-helpers
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.8
5
+ version: 1.0.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Orner