jqr-helpers 1.0.32 → 1.0.33

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/Readme.md CHANGED
@@ -170,10 +170,10 @@ Tabs (and eventually accordion panes and menus) are rendered using a "panel rend
170
170
  This allows you to loop through the tabs in an intuitive and concise way.
171
171
 
172
172
  <%= tab_container {:collapsible => true}, {:class => 'my-tabs}' do |r| %>
173
- <%= r.panel 'Tab 1', do %>
173
+ <% r.panel 'Tab 1' do %>
174
174
  My tab content here
175
175
  <% end %>
176
- <%= r.panel 'Tab 2', 'http://www.foobar.com/' %>
176
+ <% r.panel 'Tab 2', 'http://www.foobar.com/' %>
177
177
  <% end %>
178
178
 
179
179
  ## jQuery Events ##
data/jqr-helpers.gemspec CHANGED
@@ -1,8 +1,8 @@
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.32'
5
- s.date = '2014-02-26'
4
+ s.version = '1.0.33'
5
+ s.date = '2014-03-02'
6
6
  s.summary = 'Helpers to print unobtrusive jQuery-UI tags.'
7
7
  s.description = <<-EOF
8
8
  This gem adds helper methods to create unobtrusive jQuery code. It outputs
@@ -25,11 +25,11 @@ module JqrHelpers
25
25
  def panel(title, url_or_options={}, options={}, &block)
26
26
  if url_or_options.is_a?(String)
27
27
  url = url_or_options
28
- content = ''
28
+ content = nil
29
29
  id = nil
30
30
  else
31
31
  options = url_or_options
32
- content = yield
32
+ content = block
33
33
  id = Helpers._random_string
34
34
  url = '#' + id
35
35
  end
@@ -245,10 +245,10 @@ module JqrHelpers
245
245
  # (with a URL).
246
246
  # @example
247
247
  # <%= tab_container {:collapsible => true}, {:class => 'my-tabs}' do |r| %>
248
- # <%= r.panel 'Tab 1', do %>
248
+ # <% r.panel 'Tab 1' do %>
249
249
  # My tab content here
250
250
  # <% end %>
251
- # <%= r.panel 'Tab 2', 'http://www.foobar.com/' %>
251
+ # <% r.panel 'Tab 2', 'http://www.foobar.com/' %>
252
252
  # <% end %>
253
253
  # @param options [Hash] options to pass to the jQuery tabs() method.
254
254
  # @param html_options [Hash] options to pass to the tab container element
@@ -271,7 +271,7 @@ module JqrHelpers
271
271
  end
272
272
  s3 = renderer.panels.inject('') do |sum, panel|
273
273
  if panel[:options][:id]
274
- sum = sum + content_tag(:div, panel[:content], panel[:options])
274
+ sum = sum + content_tag(:div, panel[:options], &panel[:content])
275
275
  end
276
276
  sum
277
277
  end
@@ -1,6 +1,6 @@
1
1
  module JqrHelpers
2
2
  # @private
3
3
  module Rails
4
- VERSION = '1.0.32'
4
+ VERSION = '1.0.33'
5
5
  end
6
6
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: jqr-helpers
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.32
5
+ version: 1.0.33
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Orner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-26 00:00:00.000000000 Z
12
+ date: 2014-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails