Re: Extending methods in the module Inflector ?

Sean T Allen
2005-07-19T17:14:29Z

Radek Hnilica wrote:

>On Tue, Jul 19, 2005 at 12:32:03PM -0400, Sean T Allen wrote:
>
>
>>scaffold takes the class name as well...
>>
>>
>
>I think it''s not true.
>
>Scafold takes some unknown argument, do some black magic with it and
>then takes class name from that magic and oraculum.
>
>Try to prove.  I''ll be happy If I''m wrong.
>
>
>
http://api.rubyonrails.com/classes/ActionController/Scaffolding/ClassMethods.html#M000107

scaffold(model_id, options = {})

Adds a swath of generic CRUD actions to the controller. The model_id is
automatically converted into a class name unless one is specifically
provide through options[:class_name]. So scaffold :post would use Post
as the class and @post/@posts for the instance variables.

It’s possible to use more than one scaffold in a single controller by
specifying options[:suffix] = true. This will make scaffold :post,
:suffix => true use method names like list_post, show_post, and
create_post instead of just list, show, and post. If suffix is used,
then no index method is added



_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org