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.
Comments
Hi, yes layout matters a lot like this one
http://insurancecolumn.com/what-is-insurance-complete-guide/
Hi, http://insurancecolumn.com/what-is-insurance-complete-guide/
<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>
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.
You ought to dependably run with a moneylender that is straightforward and really inspired by helping you with your present circumstance.
download the latest images and wallpapers..
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
<a href="https://www.imoforpcc.com">imo for pc</a>
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
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/ There are many alternative streaming applications and apps like netflixavailable to Netflix as you can watch Movies
http://netflixlogins.org/
http://vinodjat.doodlekit.com/
http://happy-newyeargif.com/
http://www.best-newyearwishes.com/
http://www.newyearwishesmessages.org/
http://www.newyearwishesforfriends.com/
http://newyear2018whatsapp.com/
abcya Are you looking for the best Kids games from ABCYA? Then you are at the right place
http://abc-yagame.org/
you can root your mobile easily by downloading this app
https://framaroot-app.com/
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/
http://stremio.cabanova.com/
best file sharing app in the world you can get all the data shared easily
https://www-shareit.com/
http://gamekillerapk.wikidot.com/
This a good way to appreciate the teacher as they put their efforts to train students. UK dissertation Writers appreciates the teachers.
Address By Zip Code Tracking
Bluedart Tracking
USPS Zip code lookup
Usps tracking
FedEx tracking
DHL tracking
India Post tracking
Delhivery Courier Tracking
<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>
https://www-shareit.com/pc-windows/
Walmart store offers its customers very friendly, flexible purchase...
Walmart store offers its customers very friendly, flexible purchase..
https://www-shareit.com/pc-windows/
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.
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.
Great information thanks for sharing this amazing article also visit https://technopitara.com/check-viewed-whatsapp-profile-today/
Thanks for sharing this article https://technopitara.com/sites-send-anonymous-sms-without-registration/
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
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
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>
Hi, yes. I think you should follow this layout
<a href="www.australianvisa.com.my">www.australianvisa.com.my</a>
Thanks buddy for sharing the wonderful article
https://www.smadavfree.com/smadav-2019-free-download.html
http://www.avast2019.com/avast-2019-free-download/
great
ZapApk is a site where u can share your games , apps , livewallpapers and themes for all Android .
https://zapapk.com/
To download paid apps for free a getapkdownload.org is a perfect destination. https://getapkdownload.org/
CVS is understood to have prestige with their employees' requirements. Many programs for the CVS workers have actually currently been created by the management.
CarMax is the United States' largest used-car retailer and a Fortune 500 company
https://carmax-cars.org/
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.
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
Lucky Patcher is a must-have hacking app for all the crazy gamers - https://luckypatcherapkios.com
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. -
https://aterrariumtvapp.com
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/
Great article, many thanks for sharing.
I Love this amazing iformative website this is good idea.
http://www.priyankasen.com/
This article is such a nice and interesting one.
http://www.priyankasen.com/
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
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/
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/