Sha256: e9fca4eec6f701053bcd42b3b29dfd8c45b5b8da9f9f33b56ec1f73a76efcff6
Contents?: true
Size: 685 Bytes
Versions: 10
Compression:
Stored size: 685 Bytes
Contents
module Gaku module SharedHelper def can_edit? %w( edit create update ).include? action_name end def genders { t(:'gender.female') => false, t(:'gender.male') => true } end def state_load(country_preset) country = Gaku::Country.find_by(iso: country_preset) if country country.states else Gaku::State.none end end def disabled?(country_preset) country = Gaku::Country.find_by(iso: country_preset) if country country.states_required else true end end def render_flash escape_javascript(render 'gaku/shared/flash', flash: flash) end end end
Version data entries
10 entries across 10 versions & 2 rubygems