Forum: Ruby on Rails Need to use a method without the layout

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Aa776a6aaefaabca63e989e7042da5e2?d=identicon&s=25 cranberry (Guest)
on 2006-03-31 02:39
I need to use a method (called by one of my controllers) without using
the layout. All the other methods in the controller need to use this
layout except for thismethod (becausae it's called by an Ajax script). I
know how to use :layout=>layout_name when calling a method from another
method, but nothing is calling this.
The layout needs to be removed in the method itself or I need to call
another ('blank') method instead.

Please help!

thank you!
E025e426244a038645a4a08ba1a2d97f?d=identicon&s=25 Anthony Moralez (Guest)
on 2006-03-31 03:13
(Received via mailing list)
>From http://api.rubyonrails.com/classes/ActionControlle...

  # Renders the template for the action "short_goal" within the
current controller,
  # but without the current active layout
  render :action => "short_goal", :layout => false

hope that helps.
Anthony Moralez
http://anthonysseblog.blogspot.com
Aa776a6aaefaabca63e989e7042da5e2?d=identicon&s=25 cranberry (Guest)
on 2006-03-31 04:18
Anthony Moralez wrote:
>>From http://api.rubyonrails.com/classes/ActionControlle...
>
>   # Renders the template for the action "short_goal" within the
> current controller,
>   # but without the current active layout
>   render :action => "short_goal", :layout => false
>
> hope that helps.
> Anthony Moralez
> http://anthonysseblog.blogspot.com

Thank, but this will *not* work because nothing is rendering this
method. Any other suggestions?
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Mikkel Bruun (Guest)
on 2006-03-31 12:35
(Received via mailing list)
layout "standard",:except=>"some_action"

On Friday, March 31, 2006, at 4:18 AM, cranberry wrote:
>> Anthony Moralez
>http://lists.rubyonrails.org/mailman/listinfo/rails
Mikkel Bruun

www.strongside.dk    - Football Portal(DK)
ting.minline.dk      - Buy Old Stuff!(DK)
This topic is locked and can not be replied to.