> But I don't get the principle.

There is no such principle as the Sandwich principle.  The principle is 
Don't Repeat Yourself(DRY).  So if you find yourself writing the same or 
similar code over and over again, try to figure out a way to extract the 
repeated part into a method.  That way you can write the code once in 
the method, and then call the method when needed.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to