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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 23, '12 at 11:15a
activeSep 23, '12 at 3:21p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

7stud --: 1 post Roelof: 1 post

People

Translate

site design / logo © 2021 Grokbase