我有下表:
# views/students/index.html.haml
%table.table
%thead
%tr
%th=t :first_name # doesn`t work
%th=t '.last_name' # works
%tbody
- @students.each do |s|
%tr
%td=s.first_name
%td=s.last_name
这是我的语言环境文件:
pl:
students:
index:
first_name: "Imię"
last_name: "Nazwisko"
可以使用符号而不是字符串 '.first_name' 吗?