Ruby on Rails Thursday, December 1, 2011

On 1 December 2011 20:57, Alexey Muranov <lists@ruby-forum.com> wrote:
> I tried to replace
>
> self.fixture_class_names = self.fixture_class_names.merge(class_names)
>
> with
>
> self.fixture_class_names.merge!(class_names) # Why does this fail?

At a guess, I'd say because "self.fixture_class_names=" is a method
that does some setting within it, while with the other syntax, you're
trying to call a bang method on the return value of a method.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment