module FixtureHelper def fixture_base_path Pathname.new(File.expand_path('../../../fixtures', __FILE__)) end def fixture_fake_repo_path Pathname.new(File.expand_path...
Every developer loves to individualize prompts and play around with the cool features. Or at least... I do. Here's...
...tags, you will see some basic controls for them, but usually, they do not include the control for changing the playback speed. Since I usually want to playback audio or...
test: <<: *default database: zitate_test Note that you do not have to include a username, password and port (at least as long as postgres runs on its default...
Best results in other decks
...from prepended modules (Ruby 2.0+ feature) Methods from the object's class Methods from included modules Methods from the class hierarchy (superclass and its ancestors) Example
...have the following class hierarchy: class Superclass def action puts "Superclass" end end module IncludedModule def action puts "Included module" super end end module PrependedModule def action puts "Prepended module...
Using .includes or .eager_load with 1-n associations is dangerous. Always use .preload instead. Consider the following ActiveRecord query: BlogPost.eager_load( :comments :attachments, ).to_a
...the full cross product of the blog post × all its comments × all its attachments, including 1000 redundant copies of all the fields of the blog post. If you add a...