junky
junky

Reputation: 1478

undefined method `layout' for #<WelcomeController:0x00000006ab2df8>

I want my welcome controller to use a different layout:

class WelcomeController < ApplicationController

  def index
    if signed_in?
      layout 'default'
    else
      layout 'welcome'
    end
    render 'welcome/index'
  end

end

Upvotes: 1

Views: 925

Answers (1)

Veraticus
Veraticus

Reputation: 16064

class WelcomeController < ApplicationController

  def index
    if signed_in?
      render :layout => 'default'
    else
      render :layout => 'welcome'
    end
  end

end

Upvotes: 5

Related Questions