You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per #92, when defining an association with a name that doesn't match the
class, the writer method does not work:
```
class Author < ActiveRemote::Base
end
class Post < ActiveRemote::Base
belongs_to :co_author, :class_name => "Author"
end
2.6.10 :002 > post = Post.new
2.6.10 :002 > post.coauthor = Author.new
=> #<Author ... >
2.6.10 :003 > post.coauthor
=> nil
```
It turns out this is because the reader method was using the association
name as the instance variable (`@coauthor`), but the writer method was
using the name of the class that was set as the instance variable
(`@author`).
Update the writer method to use the association name for the instance
variable.
When defining an association with a name that doesn't match the class, the writer method does not work:
The text was updated successfully, but these errors were encountered: