Re: [Rails] Need help to understand the difference between #dup and #clone while working singleton methods

2013-09-22 Thread Narrenblut .
I'd think, the difference in following example shows easier, where is the difference in you case, too foo = [1,2] bar= foo.dup foo 3 puts bar.inspect foo= [ [1,2] ] bar = foo.dup foo[0] 3 puts bar.inspect Try it with clone - and you recognize the difference between deep copy clone and

Re: [Rails] Re: undefined method `model_name' for NilClass:Class

2011-01-28 Thread narrenblut
I would think, @user_comment is nil. Could you attach your controller, too? On 28.01.2011, at 03:43, David G. wrote: Thanks. Same results. So I am also attaching the user_comments\new.html.erb file. Show of User should let you create a new comment. ActionView::Template::Error

Re: [Rails] Symbols not recognized after nesting routes - NoMethodError in Timesheets#new

2011-01-27 Thread narrenblut
Perhaps I just have never seen your kind of defining form_for. But I had expected something like: %= form_for(@timesheet, :url = user_timesheets_path(@timesheet.user)) do |f| % div class=field %= f.label :user_id %br / %= f.text_field :user_id % /div div class=field %=