schematic 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -133,7 +133,7 @@ module Schematic
133
133
  end
134
134
 
135
135
  def nested_attribute_name(name)
136
- "#{name.to_s.pluralize}-attributes"
136
+ "#{name.to_s.gsub("_", "-").pluralize}-attributes"
137
137
  end
138
138
 
139
139
  end
@@ -1,3 +1,3 @@
1
1
  module Schematic
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -380,5 +380,13 @@ describe Schematic::Serializers::Xsd do
380
380
  it "turns 'children' into 'children-attributes'" do
381
381
  xsd.nested_attribute_name('children').should == "children-attributes"
382
382
  end
383
+
384
+ it "turns 'special-children' into 'special-children-attributes'" do
385
+ xsd.nested_attribute_name("special_children").should == "special-children-attributes"
386
+ end
387
+
388
+ it "properly converts symbols" do
389
+ xsd.nested_attribute_name(:very_special_children).should == "very-special-children-attributes"
390
+ end
383
391
  end
384
392
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: schematic
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.2
5
+ version: 0.3.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Case Commons, LLC