我在视图中得到这个错误:
SyntaxError in PublicController#fast
C:/Rails/konkurranceportalen/app/controllers/public_controller.rb:11: syntax error, unexpected tASSOC, expecting keyword_end
@titel => 'Heading'
^
我在控制器中的动作:
def fast
render :template => 'kategoris/show', :layout => 'kategori'
@titel => 'Heading'
@konkurrancers = Konkurrancer.where('type', 'nyhedsbrev')
end
你只想要@titel = 'Heading'
。=>
用于构建Hash
es,如' foo = {:a => 1,:b => "bar"}