def create(options = {}, &block)
      object = get_resource_ivar || create_resource

      options[:location] = collection_path if object.errors.empty?

      respond_with_dual(object, options, &block)
    end
def create(options = {}, &block)
      object = get_resource_ivar || create_resource

      options[:location] = collection_path if object.errors.empty?

      respond_with_dual(object, options, &block)
    end
create action, creates a new object off the received params and sets an
 instance variable if record is saved then a redirect to index action is
 made.

 If record fail to be saved, the new form is renderd and the instance
 variable can be accessed from the view using the resource
 helper method. The instance variable is named after the model name
 defined in the restful macro.