collectiveidea/interactor-rails
关于
Interactor Rails 为 Interactor gem 提供 Rails 支持。
开发工具实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Interactor Rails
Interactor Rails provides Rails support for the Interactor gem.
Installation
Add this line to your application's Gemfile:
gem "interactor-rails", "~> 2.0"
Interactor Rails is tested against Ruby 3.1 and newer on Rails 7.0 or newer. For older versions of Ruby and Rails use version 2.2.1.
Usage
Interactor Rails ensures that app/interactors is included in your autoload
paths, and provides generators for your convenience.
rails generate interactor authenticate_user
adds to app/interactors/authenticate_user.rb:
class AuthenticateUser
include Interactor
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
adds to app/interactors/place_order.rb:
class PlaceOrder
include Interactor::Organizer
organize ChargeCard, SendThankYou, FulfillOrder
end
Contributions
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.
Thank You!
A very special thank you to Attila Domokos for his fantastic work on LightService. Interactor is inspired heavily by the concepts put to code by Attila.
探索相关项目
加载中…