RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

Three Ways to Redefine a Private Method

Learn the different ways to redefine a private method and evaluate the impact of each approach.

Why would I want to redefine a private method?
Brad is asking the important question, but it’s also worth pointing out that va…
This was done in a real project I worked by a developer who redefined a private…

Create maintainable queries in Ruby with query object and criterias

Leaving query logic in a single class lead to god objects hard to maintain, I explain a maintainable alternative with query objects and criterias http://teotti.com/create-maintainable-mongodb-queries-in-ruby-with-query-object-and-mongoid-criterias/ The examples use mongodb but can be implemented with Active Record too.

You also have siphon to dynamically apply scopes on any activeRelation object. …

Method transplanting in Ruby

Method transplanting is an elegant solution to keeping classes clean. This solution will work perfectly when a transplanted method has no dependencies on other methods from the original module considering unbound/bound do not track them. [more inside]

Loading older posts