simple_nested_form 0.0.3 → 0.0.4

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_nested_form (0.0.2)
4
+ simple_nested_form (0.0.4)
5
5
  simple_form (~> 1.3.1)
6
6
 
7
7
  GEM
@@ -62,7 +62,7 @@ module SimpleNestedForm
62
62
  end
63
63
 
64
64
  def fields_for_nested_model(name, association, args, block)
65
- content_tag :div, :class => "fields" do
65
+ content_tag :div, :class => "fields #{association.class.model_name.human.downcase}" do
66
66
  super
67
67
  end
68
68
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleNestedForm
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -9,11 +9,10 @@ describe SimpleNestedForm::Builder do
9
9
 
10
10
  describe "fields wrapper" do
11
11
  before { project.tasks.build }
12
- subject { builder.fields_for(:tasks) { "Task"} }
12
+ subject { Nokogiri::HTML(builder.fields_for(:tasks) { "Task" }).css("div").first.attr("class") }
13
13
 
14
- it "surrounds the nested fields with a div with class fields" do
15
- subject.should == '<div class="fields">Task</div>'
16
- end
14
+ it { should include "fields" }
15
+ it { should include "task" }
17
16
  end
18
17
 
19
18
  shared_examples_for "a link_to_add" do |link_name|
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_nested_form
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rodrigo Navarro
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-08 00:00:00 -03:00
19
+ date: 2011-03-09 00:00:00 -03:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency