2012-10-31 22 views
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」?

回答

2

它將與:'.first_name'(我認爲你所指的「符號」是期間)

相關問題