Ruby on Rails Monday, April 18, 2016



On Monday, April 18, 2016 at 3:53:44 PM UTC-4, Colin Law wrote:
On 18 April 2016 at 19:07, fugee ohu <fuge...@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

Like what inconsequential function of params[:file_name] could i use? i tried params[:file_name].to_s but it had no affect

--
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/bc8d5ce7-7739-4da0-a185-743284c40cd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment