Interactor Rails provides Rails support for the Interactor gem.
Add this line to your application's Gemfile:
gem "interactor-rails", "~> 2.0"
Interactor Rails is compatible with Ruby 2.3, 2.4, or 2.5 on Rails 4.2, 5.0, 5.1, or 5.2.
Interactor Rails ensures that
app/interactors is included in your autoload
paths, and provides generators for your convenience.
rails generate interactor authenticate_user
class AuthenticateUser include def call # TODO end end
There is also a generator for organizers.
rails generate interactor:organizer place_order charge_card send_thank_you fulfill_order
class PlaceOrder include ::Organizer organize ChargeCard, SendThankYou, FulfillOrder end
Interactor Rails is open source and contributions from the community are encouraged! No contribution is too small.
See Interactor Rails' contribution guidelines for more information.