rails 字符串
字符串的內嵌形式;
1.<%= link_to "第#{@m}期",:action=>"show" %>
2.def hello(name)
" Welcome, #{name} !"
end
3.Post.find(:all,:conditions=>'id= #{params[:id]}')
1.<%= link_to "第#{@m}期",:action=>"show" %>
2.def hello(name)
" Welcome, #{name} !"
end
3.Post.find(:all,:conditions=>'id= #{params[:id]}')
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
RubyMotion 初玩
hexudong08
2020-07-06 04:02:59
3天ruby入門到實戰筆記
zlsdmx
2020-07-07 08:47:33
Ruby正則表達式的一個例子
hxbguoke
2020-07-06 06:28:48
Rails的script如何引入Rails的環境?
hexudong08
2020-07-06 04:02:59
Ruby on Rails的國際化,本地化問題的解決(轉載)
iteye_17269
2020-07-08 02:37:16
#100 5 View Tips
Tip #1: Whitespace in ERB TemplatesUse a dash at the beginning and end of a
iteye_19623
2020-07-04 22:57:33
如今誰坐龍位?
iteye_1369
2020-07-03 17:52:45
怎麼樣在Ruby中創建一個代理類?
在Ruby創建一個代理類有些時候可以幫助我們做一些很coo的事情,事實上實現這個很簡單的。你有沒有思考過Rails的ActiveRecord中的關聯一
iteye_3589
2020-07-03 02:03:29
Rails Query Cache Context Plugin
There is a simple query cache in Rails. When you use find method to query a
iteye_19562
2020-07-03 01:05:53
【轉】你欠自己一個老學究的身份
iteye_19871
2020-07-02 16:06:25
08年一月份
08年1月份在做一個rails項目的時候,仔細的學了一下ruby。在接下來的3周,繼續做這個項目,並且在項目熟悉Extjs, prototype等js
iteye_4615
2020-07-01 04:06:14
rails ruby inject 使用類似於python reduce
mlzboy
2020-07-01 00:00:12