On Nov 29, 7:34 pm, John Merlino <li...@ruby-forum.com> wrote:
> You are right. It worked. Nevertheless, the behavior was the same. We
> instantiated an object and called a constructor method of the class.
> Both User and UsersController are classes. I don't know what is causing
> the behavior to be different.

Rails creates an instance of your controller for you as part of the
request handling process, and is probably expecting a controllers
initialize method to take 0 arguments, but since you've changed the
signature of initialize that blows up. Overriding initialize like that
on a subclass of ActiveRecord will also cause trouble but it might
take a little longer for you to get into trouble.

Fred
>Are there any good books on MVC design
> patterns? I already have the book Design Patterns in Ruby and I don't
> see MVC mentioned in it. Thanks for response.
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to