Sha256: c3516ce9232bc005d04edda9f70015ed726419cc43551081c6879af0d3f78740
Contents?: true
Size: 594 Bytes
Versions: 7
Compression:
Stored size: 594 Bytes
Contents
module ActsAsApprovable module Generators module Base protected def owner? options[:owner].present? end def owner options[:owner] == 'owner' ? 'User' : options[:owner] end def scripts? options[:scripts] end def collection_actions actions = [:index, :history] actions << :mine if owner? actions.map { |a| ":#{a}" } end def member_actions actions = [:approve, :reject] actions << :assign if owner? actions.map { |a| ":#{a}" } end end end end
Version data entries
7 entries across 7 versions & 2 rubygems