Ruby Taiwan Group

  • 社區
  • Wiki
  • 酷站
  • 會員
  • 註冊
  • 登入
  • Home/
  • Wiki/
  • essential ruby rails knowledge
Feed
版本

1. Rails MVC

什麼東西應該放在 View

  • 什麼是 helper
  • 什麼是 partial
  • 什麼是 collection partial
  • 什麼東西應該放在 partial / 什麼東西應該放在 helper
  • yield in view
  • 不應該放在 view 裡的東西
  • form
  • essential helpers
  • helper pattern's

什麼東西應該放在 controller

  • before_filter
  • render template
  • render layout
  • render text
  • render options
  • redirect_to 與 render
  • respond_to 與 respond_with
  • builders

什麼東西應該放在 model

  • has_many :through
  • validation
  • scope
  • ids
  • collect and id
  • includes
  • counter_cache
  • STI
  • Polymorphic Assoiciaion
  • 不要把該放在 helper 的東西放在 model 裡
  • refactor controller code to model

2. 關於 Rails

  • RESTful
  • Routing
  • Rack
  • Bundler
  • Unobtrusive Javascript
  • I18n

3. 關於 Ruby

  • Ruby syntax
  • String / Array / Hash
  • map
  • lambda
  • self
  • block
  • instance method / class method
    • http://railstips.org/blog/archives/2009/05/11/class-and-instance-methods-in-ruby/
  • instance variable / class variable
    • http://railstips.org/blog/archives/2006/11/18/class-and-instance-variables-in-ruby/
  • Mixin / Extend / Inheritance
    • http://railstips.org/blog/archives/2009/05/15/include-vs-extend-in-ruby/
  • override

4. Advanced Techniques

  • Custom Generators
  • Packing Gems

© Ruby Taiwan Group.