lib/padrino-responders/default.rb
##
# It's default response for GET requests, eg. listing, show, new, edit, etc.
# This is basic action - when request wants html or js, then will be rendered
# default template for action, otherwise object will be serialized to 
# needed format. 
#
It's default response for GET requests, eg. listing, show, new, edit, etc.
This is basic action - when request wants html or js, then will be rendered
default template for action, otherwise object will be serialized to
needed format.
It ' s default response for GET requests eg . listing show new edit etc . This is basic action - when request wants html or js then will be rendered default template for action otherwise object will be serialized to needed format .
def default_response(object, location=nil)
          if location
            redirect location
          else
            if [:html, :js].include?(content_type)
              render "#{controller_name}/#{action_name}"
            else
              render content_type, object
            end
          end
        end
def default_response ( object , location = nil ) if location redirect location else if [ :html , :js ] . include? ( content_type ) render "#{controller_name}/#{action_name}" else render content_type , object end end end
It's default response for GET requests, eg.
It ' s default response for GET requests eg .
object
<not_specific>
location
<not_specific>