What does this kind of keyword use do in Ruby?

yaquawa

I'm new to Ruby, and learning Ruby on Rails.

I saw this code:

class DemoController < ApplicationController
  layout false

  def index
  end
end

What does layout false mean?

I've seen the include keyword, but I've never seen layout before. Is a Rails specific keyword?

What exactly does the 'keyword space keyword' form mean in Ruby, and is there a language specification? And can I create my own 'keywords'?

Anthony Smith

layout isn't a keyword. layout false is the same as layout(false). The parentheses are optional for method calls in Ruby.

See the layout documentation for details of the layout() method in Rails.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related