23 Aug '12, 1pm

Started playing with the Draper gem and wrote about my experiences/thoughts: /cc @steveklabnik @j3

August 23, 2012 Tagged: decorators draper oop rails testing Comments (View) Using the Draper Gem, Round One Draper is a handy new gem for extracting logic normally held in helpers and views into something Ruby developers love: objects! Helpers are a great means to an end, but most of the time, our helpers accept arguments, a great sign that the method is procedural instead of being a method on the object we’re passing. In my Intro to Test-Driven Rails workshop (which I’m holding September 17-18 in San Francisco and September 24-25 in Boston), one of the apps we build is a simple todo tracker. I decided to try out Draper in the codebase and see how things turned out; let’s dig in to some code and see what it can do! Here’s the helper in question: # app/helpers/todos_helper.rb module TodosHelper def completion_link(todo) if todo.completed_at? link_to 'Incomplete', todo_compl...

Full article: http://robots.thoughtbot.com/post/29549610681/using-the-d...

Tweets

how to write a jruby gem

rubyflow.com 28 Aug '12, 10am

how to write a jruby gem Posted by flyerhzm on August 28, 2012 — 0 comments Here are my serial posts to introduce how to w...

Just published a post on how to build your own ...

backstage.official.fm 27 Aug '12, 8am

Validating your data through Rails models is essential. It enables you to ensure consistency throughout your data structur...

Ruby on rails gem to show one-time messages to ...

stackoverflow.com 26 Aug '12, 11am

Are there any gems or libraries that can be used to show a message once to a user? I'm looking in particular for something...

Ruby Development Quick Tip - Use the ssh-foreve...

rubyflow.com 21 Aug '12, 4pm

Ruby Development Quick Tip - Use the ssh-forever Gem - Stop Typing Your SSH Passwords Posted by dotnetguyuk on August 21, ...