Skip to content

Include to Interactions #10

@frostmark

Description

@frostmark

I use gem 'active_interaction' and pager-api not included to class Interactions

code example

class Interactions::Users::List < ActiveInteraction::Base
  include Contracts::Core
  include Contracts::Builtin

  array :role, default: nil do
    :string
  end

  Contract None => ActiveRecord::Relation
  # @return [ActiveRecord::Relation<User>]
  def execute
    users = User.all
    users = users.where(role: role) if given?(:role)
    users
  end
end

It would be good else PagerApi be included

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions