Sha256: de2117297fb9813dd9e191cf77972ba8599648f278fbd4ff8cc195f8986f53d7
Contents?: true
Size: 690 Bytes
Versions: 36
Compression:
Stored size: 690 Bytes
Contents
module IshManager module ApplicationHelper def pretty_date input return input.strftime("%Y-%m-%d") end def pp_errors errors return errors end def user_path user if user.class == 'String' "/users/#{user}" elsif user.class == User "/users/#{user.id}" elsif user.class == NilClass "/users" end end def pretty_date date date.to_s[0, 10] end def resource_path resource case resource.class.name when 'City' city_path( resource.id ) when 'Event' event_path( resource.id ) when 'Venue' venue_path( resource.id ) end end end end
Version data entries
36 entries across 36 versions & 1 rubygems