Sha256: 20f22f206fb309b4130fd08c9c97952f641f6dbcf2a82aecfc25d762ea571675
Contents?: true
Size: 315 Bytes
Versions: 1
Compression:
Stored size: 315 Bytes
Contents
module ShouldaRouting module Routes module Helpers def permutations stack stack.inject(&:product).map{|e| e.flatten rescue [e]} end def params stack params = {} stack.each{ |e| params[:"#{e.to_s.singularize}_id"] = "1" } params end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoulda_routing-0.0.2 | lib/shoulda_routing/routes/helpers.rb |