Anil Wadghule
2006-Aug-17 12:18 UTC
[Rails] One common template for different actions ?? possible or not?
Hi all, Hey I want to know that, is it possible to have commont templates for different methods(actions) in the controller? Please reply! -- Regards, Anil Wadghule http://anilw.info Don''t live to geek; geek to live. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/54bee41d/attachment.html
Benjamin Curtis
2006-Aug-17 12:26 UTC
[Rails] One common template for different actions ?? possible or not?
If you''re thinking of something like a layout for a controller, no, that''s not available. However, the simple sidebar plugin (http:// www.agilewebdevelopment.com/plugins/simple_sidebar) might fit your needs. -- Benjamin Curtis http://www.bencurtis.com/ http://www.tesly.com/ -- Collaborative test case management http://www.agilewebdevelopment.com/ -- Resources for the Rails community On Aug 17, 2006, at 5:18 AM, Anil Wadghule wrote:> Hi all, > > Hey I want to know that, is it possible to have commont templates > for different methods(actions) in the controller? > Please reply! > > -- > Regards, > Anil Wadghule > http://anilw.info > Don''t live to geek; geek to live. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/adb5bb99/attachment.html
John Browning
2006-Aug-17 12:30 UTC
[Rails] One common template for different actions ?? possible or not?
yes, the standard scaffold shows one way. For example, the standard
index action is
def index
list
render :action => ''list''
end
the render bit says to display with the template as for list. In general
render :action => thing
will use the templates for thing (using standard naming conventions
-- ie, the template has the same name as the action + .rhtml)
More elaborate overriding of templates is possible, if you read the
relevant documentation.
........................................................................
..........
John Browning
On 17 Aug 2006, at 13:18, Anil Wadghule wrote:
> Hi all,
>
> Hey I want to know that, is it possible to have commont templates
> for different methods(actions) in the controller?
> Please reply!
>
> --
> Regards,
> Anil Wadghule
> http://anilw.info
> Don''t live to geek; geek to live.
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/23ac0f0f/attachment.html