deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: 中文字比較
http://deeplyloverubyonrails.blogspot.com/2008/06/blog-post.html
要比較 a[0]= b[0] & a[1]= b[1] & a[2] = b[2]. 訂閱: 張貼留言 (Atom). Deeply love watch and listen. Deeply love html and css. Deeply love javascript and ajax. Deeply love apple and mac. App程式設計入門 iPhone . iPad 第二版 2012.2 App程式設計入門 iPhone . iPad 第一版 2010.11.
deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: rails API
http://deeplyloverubyonrails.blogspot.com/2008/06/rails-api.html
標籤: rails general. 訂閱: 張貼留言 (Atom). Deeply love watch and listen. Deeply love html and css. Deeply love javascript and ajax. Deeply love apple and mac. App程式設計入門 iPhone . iPad 第二版 2012.2 App程式設計入門 iPhone . iPad 第一版 2010.11.
deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: included & extend
http://deeplyloverubyonrails.blogspot.com/2008/06/included.html
The method defines the action to do when the class or module get included . Extend the class's ability by including module. Note: use object to extend, get instance method, . 160; use class to extend, get class method. 訂閱: 張貼留言 (Atom). Deeply love watch and listen. Deeply love html and css. Deeply love javascript and ajax. Deeply love apple and mac. App程式設計入門 iPhone . iPad 第二版 2012.2 App程式設計入門 iPhone . iPad 第一版 2010.11.
deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: partial
http://deeplyloverubyonrails.blogspot.com/2008/06/partial.html
Include the view in other file. Render the view in books.html.erb ( the partial view file must . Render :partial = "rabbit/list". Render the view in different directory. Note: the variable partial view can access is the variable the master view can access . 標籤: rails view. 訂閱: 張貼留言 (Atom). Deeply love watch and listen. Deeply love html and css. Deeply love javascript and ajax. Deeply love apple and mac. App程式設計入門 iPhone . iPad 第二版 2012.2 App程式設計入門 iPhone . iPad 第一版 2010.11.
deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: 六月 2008
http://deeplyloverubyonrails.blogspot.com/2008_06_01_archive.html
要比較 a[0]= b[0] & a[1]= b[1] & a[2] = b[2]. 標籤: rails general. The method defines the action to do when the class or module get included . Extend the class's ability by including module. Note: use object to extend, get instance method, . 160; use class to extend, get class method. Define method for class. 160; def test. 160; puts "test". 160; end. Include the view in other file. Render the view in books.html.erb ( the partial view file must . Render :partial = "rabbit/list".
deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: 五月 2008
http://deeplyloverubyonrails.blogspot.com/2008_05_01_archive.html
Change string to symbol:. Use to sym or intern. Change symbol to string. Method 1: use to s. Method 2: use #. Only show class methods of A, not including inherited methods. Show instance methods of a. Ainstance methods equals a.methods. Show only instance methods 0f A, not including inherited methods. Private methods, public methods, protected methods, singleton methods. Check whether two objects are the same object. Define how to compare. Use Comparable module and define. The return value of method.
deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: 四月 2008
http://deeplyloverubyonrails.blogspot.com/2008_04_01_archive.html
Get date from URI. Add require 'open-uri'. 160; in the program. YAMLload(File.open("test.yaml") ). Return the content in test.yaml. Such as "name: peter" return 'name'= 'peter'. Write to YAML file. Fileopen("test.yaml", w) { output YAML.dump(names, output) }. Error handling: rescue and raise. 160; puts 1/0. 160; puts "error". Rescue can for specific exception:. 160; puts 1/0. 160; puts "error". 160; puts "test". 160; puts "rescue". 160; . Rescue ArgumentError = e. We can ...
deeplyloverubyonrails.blogspot.com
deeply love rubyOnRails: association
http://deeplyloverubyonrails.blogspot.com/2008/06/association.html
Use class methods( has one, belongs to, has many, has and belongs to many). To create instance methods. Has one and belongs to. Has many and belongs to. Has and belongs to many. The parameter for these methods:. For delete. . 160; has many :orders,. 160; :dependent= true. If the customer A is deleted, its orders are also deleted. Order= "created at ASC". Ascending order according to created at field. 標籤: rails model. 訂閱: 張貼留言 (Atom). Deeply love watch and listen.