在index.html.erb中,我希望每个大学的链接看起来如下: 申请 - 25美元
我希望显示的价格根据college.undergrad_app_fee的值而变化.
这是我尝试过的,但它不起作用.也许有一种特殊的连接语法可以将显式的"应用 - "与价格结合起来,或者我需要以某种方式逃避<%=%>,或者有一种特殊的方法可以用link_to来做到这一点?
<td><%= link_to 'Apply - ' college.undergrad_app_fee, college.application_url %></td>
Run Code Online (Sandbox Code Playgroud)