When using an overriden assocation-name, we generate correct plurals.
This commit is contained in:
parent
15eaa31e04
commit
ad87c04d4e
|
@ -54,6 +54,13 @@ describe Cocoon do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "when using aliased association and class-name" do
|
||||||
|
it "uses the correct name" do
|
||||||
|
result = @tester.link_to_add_association('add something', @form_obj, :admin_comments)
|
||||||
|
result.to_s.should == '<a href="#" class="add_fields" data-association="admin_comment" data-associations="admin_comments" data-template="form<tag>">add something</a>'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it "tttt" do
|
it "tttt" do
|
||||||
@post.class.reflect_on_association(:people).klass.new.should be_a(Person)
|
@post.class.reflect_on_association(:people).klass.new.should be_a(Person)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue