Warning: Creating default object from empty value in /homepages/39/d161420129/htdocs/p373.net/wp/wp-content/themes/p373b/admin/functions.php on line 183
Tag Archives: layouts

ProTip: Don’t name your namespaced controllers “ApplicationController”

Don’t do this: class Admin::ApplicationController < ApplicationController layout "admin" end class Admin::IndexController < Admin::ApplicationController end This works for the most part except that the layout is not chosen properly. ┬áRails just chooses the default application.html.erb layout. Instead, rename to something like this: class Admin::BaseController < ApplicationController layout "admin" end class Admin::IndexController < Admin::BaseController end you’re […]

Posted in Coding, Ruby/Rails, Technology | Also tagged , , , | Comments closed