mirror of
https://github.com/github/rails.git
synced 2026-01-09 14:48:01 -05:00
Following namespace use case was broken with Ruby 1.9:
class Author < ActiveRecord::Base
...
end
module Api
class Book < ActiveResouce::Base
end
end
Let's say XML contains <book><author><name>John</name></author>....
Api::Book.first.author.class.to_s #=>
Ruby 1.8.7: "Api::Book::Author" (namespaced, correct),
Ruby 1.9: "Author" (toplevel, broken)
Signed-off-by: José Valim <jose.valim@gmail.com>
9 lines
157 B
Ruby
9 lines
157 B
Ruby
module Asset
|
|
class Sound < ActiveResource::Base
|
|
self.site = "http://37s.sunrise.i:3000"
|
|
end
|
|
end
|
|
|
|
# to test namespacing in a module
|
|
class Author
|
|
end |