•      
  • Garbage Burrito!An online internet web blog by Ben Kittrell
  • Blog
  • Tweets
  • Contact
  • Photos
  • Favorite Burrito
  • Burrito Shop
  • Cart
  • Login
  •      
 View Cart Login        

Garbage Burrito!

An online internet web blog by Ben Kittrell

  • Blog
  • Tweets
  • Contact
  • Photos
  • Favorite Burrito
  • Burrito Shop

 About Ben

Co-Founder of Doodlekit. Coder, Home Renovator, Enjoyer of Refreshing Beverages.

Sometimes I blog here, sometimes on Doodlekit, sometimes I tweet and now I podcast.

Most recently I've been doing software development strategy consulting for Kansas City businesses.  

 Doodlekit

Doodlekit is the easiest way for small businesses to create their own website.  Used by millions in over 180 countries.

Follow us for updates.

Doodlekit on Twitter
AngelList
LinkedIn
Facebook

160x600.gif

free website builder

 

 Blog Entries

  • Great Review of Doodlekit by Comparakeet
  • New Podcast Episode - Danny O'Neill - The Roasterie - Spare Room Radio
  • What I Wish Someone Told Me Before I Started Buying Podcast Equipment
  • Announcing Spare Room Radio - New Podcast
  • Google Fiber Experiment: Cloud Video Transcoding
more  

 Links


  • website reviewer
  • live on - sharing memories
  • kids website builder
  • resume website
  • martial arts website builder
  • affiliate website builder
  • teacher website

 Login

 Forgot Password?

 Forum Posts

  • rajablogid: RE: Stupid Simple, Yet Effective
  • julie mack: RE: JavaScripting with PDF's?
  • Megan Cunningham: RE: Java Generics
  • Deepika Sharma: RE: Grilled Cheese
  • German Byrd: RE: Grilled Cheese
more  

 Custom Login

 Forgot Password?
 Register

 Back to Blog

Putting your layouts in a non "layouts" directory in Rails

Ben Kittrell
 05/04/2012 06:51PM

It's very easy to tell Rails to look for a layout in a different location from default, example...

render :layout => '/path/to/layouts/my_layout'
 

There's one caveat, the word "layouts" must be in the path.  This is probably fine for most cases, but I had a special case.  After digging through the Rails source I finally found a solution.  This method in the AbstractController is what does the check.

def _normalize_layout(value)
  value.is_a?(String) && value !~ /\blayouts/ ? "layouts/#{value}" : value
end

The solution is to simply override that method in your controller.  Here's my case.

 

def _normalize_layout(value)
  value =~ /templates/ ? value : "layouts/#{value}"
end
 
If the path has "templates" in it, then leave it alone.  Otherwise go ahead and prepend "layouts/" for default scenarios.  

 

Tags: rails, ruby, layouts, hacks

 Comments

 Brad K  09/14/2017 12:33PM 

Hi, yes layout matters a lot like this one

http://insurancecolumn.com/what-is-insurance-complete-guide/

 monicastewart115  09/14/2017 12:34PM 

Hi, http://insurancecolumn.com/what-is-insurance-complete-guide/

 HAPPY NEW YEAR 2018 WISHES My Website  09/19/2017 09:41AM 

<a href="https://www.happynewyear2018images.com/happy-dussehra-images-wishes-greetings-wallpapers-sms-for-whatsapp-facebook/">Dussehra wishes</a>,
<a href="https://www.happynewyear2018images.com/happy-dussehra-images-wishes-greetings-wallpapers-sms-for-whatsapp-facebook/">Dussehra images</a>,
<a href="http://www.happynewyear2018.net/2017/07/happy-new-year-2018-facebook-dp.html">Happy dussehra wishes</a>,
<a href="https://www.happynewyear2018images.com/happy-dussehra-images-wishes-greetings-wallpapers-sms-for-whatsapp-facebook/">Happy dussehra images</a>,
<a href="http://www.happynewyear2018.net/2017/07/free-download-happy-dussehra-vijayadashami-images-wallpaers-cards-wishes-and-whatsapp-status-messages.html">Happy Dussehra 2017 wishes</a>,

<a href="http://www.happynewyear2018quotes.com/">Merry Christmas and a Happy New Year 2018</a>
<a href="http://www.happynewyear2018quotes.net/">Merry Christmas and a Happy New Year 2018</a>
<a href="http://www.happynewyear2018quotes.com/">Merry Christmas And Happy New Year 2018</a>
<a href="http://www.happynewyear2018quotes.com/">New Year 2018 Wallpaper Free Download</a>

<a href="http://www.happynewyear2018status.net/">Happy new Year 2018 Status</a>
<a href="http://happynewyear2018greetings.com/">Happy New Year 2018 Greeting Cards</a>
<a href="http://www.happynewyear2018quotes.com/">Happy New Year 2018 Quotes in Spanish</a>
<a href="http://www.happynewyear2018quotes.com/">Happy New Year 2018 Wallpapers In Japanese</a>
<a href="http://www.happynewyear2018quotes.com/">Happy New Year 2018 Images in Italian</a>
<a href="http://www.happynewyear2018quotes.com/">Happy New Year 2018 Wishes In Hebrew</a>
<a href="http://www.happynewyear2018wishes.com/">Merry Christmas New Year Quotes</a>
<a href="https://www.happynewyear2018images.com/">Happy New Year 2018 Images Download</a>
<a href="https://www.happynewyear2018images.com/">Happy New Year 2018 Wallpapers Download</a>
<a href="https://www.happynewyear2018images.com/">Happy New Year 2018 Images</a>

 accounting assignment help  09/22/2017 09:40AM 

Many thanks for sharing this very diverse opinion post where each expert has no doubt shared his best knowledge on the topic. Have more success in your journey.

 Cash Advance San-diego My Website  09/23/2017 08:34AM 

You ought to dependably run with a moneylender that is straightforward and really inspired by helping you with your present circumstance.

 diwali images  10/14/2017 03:12PM 

download the latest images and wallpapers..

 jenniferbella My Website  10/27/2017 05:29PM 

Nice post
http://www.tinder-pc-download.com
http://www.vidmateforpcfreedownload.com
http://www.showboxforpcfreedownload.com
http://www.tinder-pc-download.com/2017/07/official-tinder-for-pc-free-download.html
http://www.tinder-pc-download.com/2017/10/tinder-application-download-how-tinder.html
http://www.tinder-pc-download.com/2017/09/tinder-for-android-latest-version-apk.html
http://www.tinder-pc-download.com/2017/08/download-tinder-for-windows-phone-free.html
http://www.vidmateforpcfreedownload.com/2017/07/official-vidmate-old-version-vidmate.html
http://www.vidmateforpcfreedownload.com/2017/07/download-vidmate-for-windows-phone-new-version.html
http://www.vidmateforpcfreedownload.com/2017/06/download-vidmate-for-iphone-ios-ipad.html
http://www.showboxforpcfreedownload.com/2017/09/download-showbox-for-pc-windows-7-8-10.html
Thanks admin

 imo for pc My Website  10/28/2017 11:13AM 

<a href="https://www.imoforpcc.com">imo for pc</a>

 vidmate for pc My Website  10/30/2017 02:32PM 

http://www.vidmateforpcfreedownload.com/
http://www.vidmateforpcfreedownload.com/
http://www.vidmateforpcfreedownload.com/

http://www.showboxforpcfreedownload.com/
http://www.showboxforpcfreedownload.com/
http://www.showboxforpcfreedownload.com/

http://www.tinder-pc-download.com
http://www.tinder-pc-download.com
http://www.tinder-pc-download.com

 Online Essay Help UK My Website  11/06/2017 02:19PM 

This might be first-rate in most instances, but I had a unique case. After digging through the Rails source I finally determined an answer. That might make an experience to them as they're operating tough to gain exact end result. If only I had your writing ability I stay up for greater updates and will be returning.
Source: https://www.trueessayhelp.co.uk/| "Online Essay Help UK"

 netflixlogins.org/ My Website  11/08/2017 12:30PM 

netflixlogins.org/ There are many alternative streaming applications and apps like netflixavailable to Netflix as you can watch Movies
http://netflixlogins.org/

 sdfsdf My Website  11/12/2017 07:25PM 

http://vinodjat.doodlekit.com/

 naveen sharma  11/16/2017 08:44AM 

http://happy-newyeargif.com/
http://www.best-newyearwishes.com/
http://www.newyearwishesmessages.org/
http://www.newyearwishesforfriends.com/
http://newyear2018whatsapp.com/

 abcya My Website  11/28/2017 02:53PM 

abcya Are you looking for the best Kids games from ABCYA? Then you are at the right place
http://abc-yagame.org/

 Frama Root Apk  12/04/2017 09:10AM 

you can root your mobile easily by downloading this app
https://framaroot-app.com/

 www.newyearwallpaper2018.com My Website  12/08/2017 04:48PM 

Very Good Content. its a very useful and Helfull article. Thanks for it.

https://www.newyearwallpaper2018.com/happy-new-year-2018-wallpaper-whatsapp/

https://nieuwjaarswens2018.nl/gelukkig-nieuwjaar-2018/

https://frohesneuesjahr-2018.de/frohes-neues-jahr-2018-wunsche/

 Stremioios  12/13/2017 03:04PM 

http://stremio.cabanova.com/

 shareit app  12/23/2017 09:17AM 

best file sharing app in the world you can get all the data shared easily

https://www-shareit.com/

 Game Killer APK  12/28/2017 06:13AM 

http://gamekillerapk.wikidot.com/

 Electronics Engineering Assignment Help Online My Website  12/28/2017 11:52AM 

This a good way to appreciate the teacher as they put their efforts to train students. UK dissertation Writers appreciates the teachers.

 USPS Tracking My Website  12/30/2017 06:27PM 

Address By Zip Code Tracking
Bluedart Tracking
USPS Zip code lookup
Usps tracking
FedEx tracking
DHL tracking
India Post tracking
Delhivery Courier Tracking

 Tracking Sites My Website  12/30/2017 06:29PM 

<a href="https://datamen.info/zip-code">Address By Zip Code Tracking </a><br>
<a href="https://check-status.online/blue-dart-tracking/">Bluedart Tracking </a><br>
<a href="https://usps-track.us/zip-code">USPS Zip code lookup</a><br>
<a href="https://usps-track.us/">Usps tracking</a><br>
<a href="http://fedex-tracking.zhost.us/fedex-tracking/">FedEx tracking</a><br>
<a href="https://courier.check-status.online/dhl-tracking/">DHL tracking</a><br>
<a href="https://courier.check-status.online/india-post-tracking/">India Post tracking</a><br>
<a href="https://courier.check-status.online/delhivery-courier-tracking/">Delhivery Courier Tracking</a><br>

 shareit  01/22/2018 07:59AM 

https://www-shareit.com/pc-windows/
Walmart store offers its customers very friendly, flexible purchase...

 shareit  01/22/2018 08:21AM 

Walmart store offers its customers very friendly, flexible purchase..
https://www-shareit.com/pc-windows/

 Write My Essay Service My Website  01/31/2018 06:34AM 

I like your post and all that you share with us is present and extremely educational, I need to bookmark the page so I can return here from you that you have completed an incredible activity.

 Write My Essay Service My Website  01/31/2018 06:47AM 

I need you to thank for your season of this magnificent read!!! I definitely appreciate each and every piece of it and I have you bookmarked to look at the new stuff on your blog an absolute necessity read a blog.

 Varsha singh My Website  02/04/2018 07:18PM 

Great information thanks for sharing this amazing article also visit https://technopitara.com/check-viewed-whatsapp-profile-today/

 technopitara My Website  02/04/2018 07:21PM 

Thanks for sharing this article https://technopitara.com/sites-send-anonymous-sms-without-registration/

  02/08/2018 05:45PM 

http://www.emailmeform.com/builder/form/93tcb8wneabymz5Cc8
https://terrarium-tv-apk.joomla.com/
https://about.me/terrarium-tv/
http://webanketa.com/forms/68s3acsh64qk8chm6ctp6chp/
https://terrariumtvwebsite.wordpress.com/
http://www.cse.iitb.ac.in/panda/node/9154
https://ttvappme.wixsite.com/terrarium-tv-vs-kodi
https://terrarium-tvme.page4.me/
http://all4webs.com/terrarium/
https://terrariumtvkodi.livejournal.com/379.html
http://terrariumapk.page.tl/
https://readymag.com/u27386360/terrarium-tv-apk-new-version-for-chromecast-iphone/
https://terrarium-tv-android-box.puzl.com/
https://terrariumtvapk.splashthat.com/
https://medium.com/@ttvappme/terrarium-apk-download-for-pc-ios-kodi-chromecast-eb91b8a48980
https://terrariumtvguide.bandcamp.com/album/terrarium-tv-download-links-for-android-pc-ios-kodi-chromecast-androidbox-firestick
https://terrarium-tv-free-download.yolasite.com/
http://terrariumtvapklatestversion.over-blog.com/2017/10/terrarium-tv-app-download-free-for-kodi-firestick.html

  02/08/2018 05:57PM 

http://www.emailmeform.com/builder/form/93tcb8wneabymz5Cc8
https://terrarium-tv-apk.joomla.com/
https://about.me/terrarium-tv/
http://webanketa.com/forms/68s3acsh64qk8chm6ctp6chp/
https://terrariumtvwebsite.wordpress.com/
http://www.cse.iitb.ac.in/panda/node/9154
https://ttvappme.wixsite.com/terrarium-tv-vs-kodi
https://terrarium-tvme.page4.me/
http://all4webs.com/terrarium/
https://terrariumtvkodi.livejournal.com/379.html
http://terrariumapk.page.tl/
https://readymag.com/u27386360/terrarium-tv-apk-new-version-for-chromecast-iphone/
https://terrarium-tv-android-box.puzl.com/
https://terrariumtvapk.splashthat.com/
https://medium.com/@ttvappme/terrarium-apk-download-for-pc-ios-kodi-chromecast-eb91b8a48980
https://terrariumtvguide.bandcamp.com/album/terrarium-tv-download-links-for-android-pc-ios-kodi-chromecast-androidbox-firestick
https://terrarium-tv-free-download.yolasite.com/
http://terrariumtvapklatestversion.over-blog.com/2017/10/terrarium-tv-app-download-free-for-kodi-firestick.html

 Naveen My Website  02/26/2018 05:07PM 

Thanks for sharing the opportunity.<a href="https://infosorce.com/windows-7-launcher-android-phone">windows 7 lancher</a>
<a href="https://infosorce.com/windows-7-launcher-android-phone/">windows 7 launcher for android</a>

 Mark My Website  03/05/2018 03:15PM 

Hi, yes. I think you should follow this layout
<a href="www.australianvisa.com.my">www.australianvisa.com.my</a>

 lee mark  03/19/2018 09:22AM 

Thanks buddy for sharing the wonderful article
https://www.smadavfree.com/smadav-2019-free-download.html
http://www.avast2019.com/avast-2019-free-download/

 avon üyelik My Website  03/28/2018 12:37AM 

great

 MarkPrins My Website  05/17/2018 03:45PM 

ZapApk is a site where u can share your games , apps , livewallpapers and themes for all Android .
https://zapapk.com/

 Daniel Mack My Website  05/18/2018 12:19PM 

To download paid apps for free a getapkdownload.org is a perfect destination. https://getapkdownload.org/

 CVS Learnet My Website  05/22/2018 09:46AM 

CVS is understood to have prestige with their employees' requirements. Many programs for the CVS workers have actually currently been created by the management.

 elisey My Website  05/28/2018 05:57AM 

CarMax is the United States' largest used-car retailer and a Fortune 500 company
https://carmax-cars.org/

 scottmckellam My Website  05/30/2018 12:06AM 

Okay, so if I'm still now sure how this works, where should I go? I typically go to <a href="https://www.scottmckellam.com/">https://scottmckellam.com/</a> for help but am open to suggestions. I really do appreciate the value you bring in all your blog posts.

 scottmckellam My Website  05/30/2018 12:08AM 

Okay, so if I'm still now sure how this works, where should I go? I typically go to www.scottmckellam.com for help but am open to suggestions. I really do appreciate the value you bring in all your blog posts

 adem My Website  05/30/2018 03:00PM 

Lucky Patcher is a must-have hacking app for all the crazy gamers - https://luckypatcherapkios.com

 conrade My Website  05/31/2018 11:40AM 

It was long back, when I was searching through the Facebook for a good game to play online, I came across the 8 Ball Pool Game. -

 kaleab My Website  06/01/2018 12:50PM 

https://aterrariumtvapp.com

 lala bahadur My Website  06/04/2018 06:04PM 

We are introducing you with the quite amazing app that can change your mood instantly. check the link and comment.

https://www.kiwibox.com/erupak_bhuiyanp/mypage/

 First One Sports xyz My Website  06/08/2018 06:43AM 

Great article, many thanks for sharing.

 Priyanka Sen My Website  06/14/2018 08:55AM 

I Love this amazing iformative website this is good idea.
http://www.priyankasen.com/

 Priyanka Sen My Website  06/14/2018 09:11AM 

This article is such a nice and interesting one.
http://www.priyankasen.com/

 jessica sinha  06/16/2018 03:34PM 

Jessica escorts services is one of the Best Escorts Service Provider in Kolkata, Out of all the Escort Services provider, we are the Best Escort Service provider in Kolkata, Checkout the best escorts services and latest hot and sexy girls pictures, hire them to make your night more beautifulFor more information CLICK NOW!!
https://www.jessicaescortsservices.com
https://www.jessicaescortsservices.com/escorts-service-kolkata
https://www.jessicaescortsservices.com/kolkata-escorts-gallery
https://www.jessicaescortsservices.com/info-kolkata_best-29-escots_service_by-Parul.html
https://www.jessicaescortsservices.com/info-kolkata_best-19-escots_service_by-Ankita.html
https://www.jessicaescortsservices.com/escotrs-service-in-kolakta
https://www.jessicaescortsservices.com/escorts-kolkata-service-6-TOP-RATED-CALL-GIRLS-IN-KOLKATA.html
https://www.jessicaescortsservices.com/park-street-escorts
https://www.jessicaescortsservices.com/info-kolkata_best-11-escots_service_by-Pooja.html
https://www.jessicaescortsservices.com/info-kolkata_best-33-escots_service_by-Anandita.html
https://www.jessicaescortsservices.com/park-street-escorts
https://www.jessicaescortsservices.com/info-kolkata_best-7-escots_service_by-AYUSI.html
https://www.jessicaescortsservices.com/info-kolkata_best-8-escots_service_by-Naina%20Singh.html
https://www.jessicaescortsservices.com/info-kolkata_best-34-escots_service_by-Naina.html
https://www.jessicaescortsservices.com/info-kolkata_best-33-escots_service_by-Anandita.html
https://www.jessicaescortsservices.com/info-kolkata_best-31-escots_service_by-komal.html
https://www.jessicaescortsservices.com/info-kolkata_best-28-escots_service_by-Gungun.html
https://www.jessicaescortsservices.com/escotrs-service-in-kolakta

 gmail account login My Website  06/20/2018 11:36AM 

You’ve written nice post, I am gonna bookmark this page, thanks for info. I actually appreciate your own position and I will be sure to come back here https://gmailloginm.com/
http://hotmaillogins.info/

 Jenelle Stevenson My Website  06/27/2018 10:14AM 

Solid streamz app is a live TV streaming app that wouldn’t let you miss your favourite shows even while you’re on the go.
https://solidstreamz.org/

 Previous 1 2 3 Next 

 Search

Follow On...

  • Facebook
  • Twitter
  • LinkedIn
  • Google+
  • Pinterest
  • RSS Feeds
  • Blog Posts,
  • Gallery Images,
  • Forum Topics

Copyright © 2006 Garbage Burrito. All Rights Reserved.
hosted by doodlekit™- free website builder

 

 powered by Doodlekit™ Free Website Builder