Getting started
gem 'action_extension'
Run bundle command to install it.
For generations service use
rails g service NAME
Service allows you to set a lot of instance variables.
service = NameService.new(var1: 'this is first instance variable', second: 2)
service.var1
service.second
For generation presenter use
rails g presenter NAME
if object class name equals name of presenter(for example: model User and presenter name UserService)
you can use
- present @user do
if object class not equals to name of presenter(for example: model User and presenter ProfilesPresenter)
you should use
- present @user, ProfilesPresenter