04 Dec 2010
    Richard Huang
    
      render is one of the often used view helpers, we can pass object, collection or local variables. From rails 2.3, more simplified syntax for render are provided.
      
Read More
     
    
      Tags 
      
      view
      
      partial
      
    
   
  
    
    23 Sep 2010
    Richard Huang
    
      If you want to generate different urls according to different objects, you should use the polymorphic_path/polymorphic_url to simplify the url generation.
      
Read More
     
    
      Tags 
      
      view
      
      helper
      
    
   
  
    
    30 Aug 2010
    Richard Huang
    
      Do you experience that your website renders slow due to loading a lot of javascripts, especially loading some third-party javascripts? Move script tags to the bottom of body can speed up the render of your website.
      
Read More
     
    
      Tags 
      
      view
      
      performance
      
      assets
      
      javascript
      
    
   
  
    
    25 Aug 2010
    Alvin Ye
    
    
      Tags 
      
      search
      
      view
      
    
   
  
    
    29 Jul 2010
    Helmut Juskewycz
    
    
      Tags 
      
      view
      
      render
      
      collection
      
    
   
  
    
    24 Jul 2010
    Wen-Tien Chang
    
      In partial view, we can use the instance variable directly, but it may be confused and make it hard to reuse anywhere, because we don't know exactly which instance variable can be used, so use the local variable in partial with explicitly assignment.
      
Read More
     
    
      Tags 
      
      view
      
    
   
  
    
    24 Jul 2010
    Wen-Tien Chang
    
      According to MVC architecture, there should not be logic codes in view, in this practice, I will introduce you to move codes into model.
      
Read More
     
    
      Tags 
      
      model
      
      view
      
    
   
  
    
    24 Jul 2010
    Wen-Tien Chang
    
      According to MVC architecture, there should not be logic codes in view, in this practice, I will introduce you to move codes into helper.
      
Read More
     
    
      Tags 
      
      view
      
      helper
      
    
   
  
    
    24 Jul 2010
    Wen-Tien Chang
    
      According to MVC architecture, there should not be logic codes in view, in this practice, I will introduce you to move codes into controller.
      
Read More
     
    
      Tags 
      
      controller
      
      view
      
    
   
  
    
    22 Jul 2010
    Wen-Tien Chang
    
      Use accepts_nested_attributes_for to make nested model forms much easier, this feature is provided by rails 2.3
      
Read More
     
    
      Tags 
      
      controller
      
      model
      
      view
      
    
   
  
    
    22 Jul 2010
    Wen-Tien Chang
    
      When you want to associate a model to many association models by checkbox on view, you should take advantage of model.collection_model_ids to reduce the code in controller.
      
Read More
     
    
      Tags 
      
      controller
      
      model
      
      view