Contact form in ruby, sinatra, and haml

前端 未结 5 955
天命终不由人
天命终不由人 2021-01-30 09:15

I\'m new to all three, and I\'m trying to write a simple contact form for a website. The code I have come up with is below, but I know there are some fundamental problems with

5条回答
  •  隐瞒了意图╮
    2021-01-30 09:53

    #{} is interpolation that is used inside "". Just using it outside for a variable assignment won't work.

    It would be more likely to be used like this:

    number_of_people = 15 
    
    Puts "There are #{number_of_people} scheduled tonight" 
    

提交回复
热议问题