我有這個微博鏈接will_paginate,我試圖將<%= user.id %>
添加到此base_link_url
但user.id不起作用。有沒有一種方法,我可以添加user.id到這個沒有收到錯誤?Rails:如何將用戶標識添加到鏈接
鏈接
<%= will_paginate microposts, :renderer => CustomLinkRenderer, :base_link_url => "https://stackoverflow.com/users/<%= user.id %>", :page_links => false , :class =>"pagination" %>
對於那些有興趣誰在那裏我得到了這一點,就從這裏開始:
Issue with will_paginate page links
的錯誤
/Users/Brian/rails_projects/project/app/views/users/_microposts.html.erb:4: syntax error, unexpected '>'
/Users/Brian/rails_projects/project/app/views/users/_microposts.html.erb:6: syntax error, unexpected keyword_class, expecting keyword_do or '{' or '('
..._buffer.safe_concat('<div class="EmptyContainer"><span class...
... ^
/Users/Brian/rails_projects/project/app/views/users/_microposts.html.erb:6: syntax error, unexpected '<'
...('<div class="EmptyContainer"><span class=\'Empty\'>Add a th...
... ^
你得到什麼錯誤? – rwilliams 2012-03-07 01:18:15
@rwilliams您從以前的工作回覆:) – Kellogs 2012-03-07 01:28:03
我取消刪除它。 – rwilliams 2012-03-07 01:31:12