Sha256: ca620ffd377a5e45ec21092a493598737fda66b0595a2c5bbffa1144a33ee98c
Contents?: true
Size: 202 Bytes
Versions: 2
Compression:
Stored size: 202 Bytes
Contents
class CityContext def key :city end def required? true end def current @city end def apply(controller, value) @city = value || controller.params[key].presence end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
contexts-1.1.0 | spec/dummy/app/contexts/city_context.rb |
contexts-1.0.0 | spec/dummy/app/contexts/city_context.rb |