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!

How to decrease coupling in your controllers & views with decent_exposure for better maintainability

I wrote up a detailed post about the decent_exposure gem. It goes into how controllers and views have strong coupling due to the passing of instance variables. The rest of the post details how you can use decent_exposure to cleanup your controllers.

Comments

This is in my opinion the most important Ruby Gem of all time. It cleans up your controllers greatly and just makes life more pleasant. Thanks for this article on it, I hope it helps bring more attention to decent_exposure.

I forgot I had actually written a post about decent_exposure myself. Read it here

We took this a bit further - defined a simple ‘decorate’ method which a decoration wrapper around ‘expose’ method. Now every time we are exposing something we are also decorating it. Checkout here: https://gist.github.com/4519822

My friend created a gem for this decent decoration ‘pattern’ we invented: https://github.com/netguru/decent_decoration

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

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