class PUNK::ListGroupsAction
Public Instance Methods
process()
click to toggle source
# File lib/punk/actions/groups/list.rb, line 18 def process # TODO: repository here # an action takes arguments (that may be entities) and returns a view object present ListGroupsView, groups: user.groups_dataset.where(tenant: tenant).all end
validate()
click to toggle source
# File lib/punk/actions/groups/list.rb, line 7 def validate validates_not_null :user validates_not_empty :user return if user.blank? validates_not_null :tenant validates_not_empty :tenant return if tenant.blank? validates_type User, :user validates_type Tenant, :tenant end