Ruby question about # Signs

前端 未结 2 1200
隐瞒了意图╮
隐瞒了意图╮ 2021-01-17 05:53

As seen here: http://railstutorial.org/chapters/rails-flavored-ruby#top for the file:

app/helpers/application_helper.rb:

module ApplicationHelper

           


        
2条回答
  •  余生分开走
    2021-01-17 06:28

    It's called string interpolation. base_title is a variable, and the #{} characters denote that its value should be substituted in place of that marker.

提交回复
热议问题