yui-on-rails 0.1.14 → 0.1.15

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.14
1
+ 0.1.15
@@ -1,24 +1,25 @@
1
1
  module YuiOnRails
2
2
  module RadioButtons
3
- def radio_buttons_for(*options, &block)
4
- radio_buttons = YuiOnRails::RadioButtons::RadioButtonsRenderer.new(*options, &block)
3
+ def radio_buttons_for(name,*options, &block)
4
+ radio_buttons = YuiOnRails::RadioButtons::RadioButtonsRenderer.new(name,*options, &block)
5
5
  radios_html = radio_buttons.render
6
6
  return concat(radios_html)
7
7
  end
8
8
 
9
9
  class RadioButtonsRenderer
10
10
 
11
- def initialize( options={}, &block )
11
+ def initialize(name, options={}, &block )
12
12
  raise ArgumentError, "Missing block" unless block_given?
13
13
  @template = eval( 'self', block.binding )
14
14
  @options = options
15
+ @name = name
15
16
  @radio_buttons = []
16
17
  yield self
17
18
  end
18
19
 
19
- def create(button_name,button_text,options={})
20
+ def create(button_text,options={})
20
21
  raise "You must provide a button name dummy.#CREATE" if button_name.blank?
21
- @radio_buttons << [button_name,button_text, options]
22
+ @radio_buttons << [button_text, options]
22
23
  end
23
24
 
24
25
  def render
@@ -29,7 +30,7 @@ module YuiOnRails
29
30
  def render_bodies
30
31
  #content_tag :div, :class=>"yui-content" do
31
32
  @radio_buttons.collect do |radio_button|
32
- radio_button_tag(radio_button[0], radio_button[1], false, radio_button[2])
33
+ radio_button_tag(@name, radio_button[0], false, radio_button[1])
33
34
  end.join.to_s
34
35
  #end
35
36
  end
data/yui-on-rails.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yui-on-rails}
8
- s.version = "0.1.14"
8
+ s.version = "0.1.15"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jeff durand"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 14
9
- version: 0.1.14
8
+ - 15
9
+ version: 0.1.15
10
10
  platform: ruby
11
11
  authors:
12
12
  - jeff durand