def resources_controller(**options)
      ResourcesController.inject(self, **options)

      self.after_save_action = options[:after_save_action] || after_save_action

      resource_belongs_to(*options[:belongs_to]) if options[:belongs_to]
      if options[:source_relation]
        protected define_method(:source_relation, &options[:source_relation])
      end
    end
def resources_controller(**options)
      ResourcesController.inject(self, **options)

      self.after_save_action = options[:after_save_action] || after_save_action

      resource_belongs_to(*options[:belongs_to]) if options[:belongs_to]
      if options[:source_relation]
        protected define_method(:source_relation, &options[:source_relation])
      end
    end
Setups basic actions and helpers in resources controller.

 #### Options

 - `sti` - include STI helpers
 - `kaminari` - include Kaminari helpers
 - `after_save_action` - action to use for `after_save_url`
 - `source_relation` - override `source_relation`