22 Dec '12, 11pm

#280 Pry with Rails - RailsCasts:

pry(#<Class:0x104e63de0>):1> show-method all.in_groups_of From: /Users/eifion/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/core_ext/array/grouping.rb @ line 19: Number of lines: 19 def in_groups_of(number, fill_with = nil) if fill_with == false collection = self else # size % number gives how many extra we have; # subtracting from number gives how many to add; # modulo number ensures we don't add group of just fill. padding = (number - size % number) % number collection = dup.concat([fill_with] * padding) end if block_given? collection.each_slice(number) { |slice| yield(slice) } else groups = [] collection.each_slice(number) { |group| groups << group } groups end end

Full article: http://railscasts.com/episodes/280-pry-with-rails?view=as...

Tweets

Rails Subscription Site with Recurly: The Rails...

rubyflow.com 23 Dec '12, 12am

Rails Subscription Site with Recurly Posted by DanielKehoe on December 22, 2012 — 0 comments The Rails Composer tool now o...

Are you a #Ruby (on #Rails) developer in the ar...

linkedin.com 22 Dec '12, 11am

Ruby on Rails has inspired the way people build web apps these days and generally engaged a huge community, however, the R...