Ruby on Rails Monday, April 18, 2016

On 18 April 2016 at 19:07, fugee ohu <fugee279@gmail.com> wrote:
> ...
> how can changing to_path affect the value of from_path ?

Because, as botp pointed out, they are referencing (pointing to) the
same object in memory.
Use
to_path = some function of params[....]
to avoid the problem. In a previous post you said you did not know
what dup does. Perhaps you should find out.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLt-PQXwV8hmp8e110upG4nvcu7Y%2B9Jun8%2B%3DYZo1svxVcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment