def resource(options = {}, &block)
      @resource ||=
        ModuleUtils.yield_for(
          # this will testify both resource and resources
          if resource_id.present? || !(options[:non_find_actions] || NON_FIND_ACTIONS).include?(action_name)
            current_servicer.find resource_id, options[:find_params]
          else
            current_servicer.new options[:new_params]
          end,
          &block
        )
    end
def resource(options = {}, &block)
      @resource ||=
        ModuleUtils.yield_for(
          # this will testify both resource and resources
          if resource_id.present? || !(options[:non_find_actions] || NON_FIND_ACTIONS).include?(action_name)
            current_servicer.find resource_id, options[:find_params]
          else
            current_servicer.new options[:new_params]
          end,
          &block
        )
    end
@note This is a template method that can be overridden by subclasses.
 This is a method to return resource for pages except `index`.

 `WARN: It does not do mass assignment since 5.2.0.`

 It can be customized as below in subclasses:

 ```
 def resource
   # do something before the origin action
   options = {} # NOTE: see `options` parameter for more details
   resource! options do |object| # NOTE: this is better than using `super`
     object.preload_status_from_api
     # NOTE: make sure object is returned
     object
   end
 end
 ```

 Otherwise, it can be replaced completely in subclasses:

 ```
 def resource
   # NOTE: make sure `@resource` and conditional assignment (the OR EQUAL) operator are used
   @resource ||= resource_id.present? ? Product.find_by_slug(resource_id) : Product.new(arrival: true)
 end
 ```
 @param options [Hash] (since 5.2.0)
 @option options [Array<String>] :non_find_actions action names that shouldn't use resource find.
   (Default to `%w(index new create)`)
 @option options [ActionController::Parameters, Hash] :find_params parameters/options for resource finding
 @option options [ActionController::Parameters, Hash] :new_params parameters/options for new resource
 @yield [resource] (since 5.2.0) a block to run to extend resource, e.g. making change to the resource.
   Please make sure to return the resource at the end of block
 @return [Object] either persisted or unpersisted resource instance
 @raise [ResourceNotFound] if resource is nil