vendor/plugins/make_resourceful/lib/resourceful/default/accessors.rb
# current_object returns an object representing the
# best-guess for what a show-like action might need for
# resource data.
#
# It basically preforms:
#
#   User.find(params[:id], :include => auto_include)
#
# However, it is built off of current_model... which
# provides a lot of flexibility. If you override this method
# try and use current_model to build off of.
#
# For instance, if you wanted to limit to 5 entries.
#
#   def current_objects
#     @current_objects ||=current_model.find(current_params, :limit => 5)
#   end
#
# Notice its recommended to cache the results
# so that multiple calls to this method do not
# require executing SQL calls.
#
current_object returns an object representing the
best-guess for what a show-like action might need for
resource data.

It basically preforms.



However, it is built off of current_model... which
provides a lot of flexibility. If you override this method
try and use current_model to build off of.

For instance, if you wanted to limit to 5 entries.



Notice its recommended to cache the results
so that multiple calls to this method do not
require executing SQL calls.
current_object returns an object representing the best - guess for what a show - like action might need for resource data . It basically preforms . However it is built off of current_model ... which provides a lot of flexibility . If you override this method try and use current_model to build off of . For instance if you wanted to limit to 5 entries . Notice its recommended to cache the results so that multiple calls to this method do not require executing SQL calls .
def current_object
        @current_object ||= if plural?
          current_model.find(current_param)
        else
          t = parent_objects[-1].send(instance_variable_name)
        end
      end
def current_object @current_object ||= if plural? current_model . find ( current_param ) else t = parent_objects [ - 1 ] . send ( instance_variable_name ) end end
current_object returns an object representing the
best-guess for what a show-like action might need for
resource data.
current_object returns an object representing the best - guess for what a show - like action might need for resource data .