0
我有如下表視圖:爲什麼我不能在Rails 3視圖中使用符號Lazy Lookup?
# 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」?