To use custom layout file in my app I'm using this following code,
set :views, File.dirname(__FILE__) + "/../views"
set :public_folder, File.dirname(__FILE__) + "/../public"
get '/' do
if !Db.empty? then
haml :home, {:layout => :nosetup-layout}
elsif request.ip == "127.0.0.1" then
haml :setup, {:layout => :nosetup-layout}
else
haml :nosetup, {:layout => :nosetup-layout}
end
end
there seems to be a problem with the layout option
I get the following error
undefined local variable or method `layout' for #<TabPlayer::Server:0x000000024509c8>
So, where did I went wrong?
Rename your layout to nosetup_layout (using an underscore).
Then just call: