Skip to content

Instantly share code, notes, and snippets.

@misutowolf
Created November 17, 2013 20:55
Show Gist options
  • Save misutowolf/7518153 to your computer and use it in GitHub Desktop.
Save misutowolf/7518153 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_filter :load_config
def load_config
@site = Siteconfig.first
end
end
undefined method `theme' for nil:NilClass
Rails.root: /vagrant/blogplatform
Application Trace | Framework Trace | Full Trace
app/controllers/welcome_controller.rb:3:in `<class:WelcomeController>'
app/controllers/welcome_controller.rb:1:in `<top (required)>'
class WelcomeController < ApplicationController
layout "#{@site.theme}/layout/application"
def index
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment