controller.rb
# if block is given, will store the block
# otherwise will check for block and call
# the block
if block is given, will store the block
otherwise will check for block and call
the block
if block is given will store the block otherwise will check for block and call the block
def perform_action(type, route, params={})
    type = type.downcase
    action = @requests[type.to_sym]
    return redirect(404) unless action[route]
    response(type, params) + action[route].call(params)
  end
def perform_action ( type , route , params = { } ) type = type . downcase action = @requests [ type . to_sym ] return redirect ( 404 ) unless action [ route ] response ( type , params ) + action [ route ] . call ( params ) end
if block is given, will store the block
otherwise will check for block and call
the block
if block is given will store the block otherwise will check for block and call the block
type
<not_specific>
route
<not_specific>
params
<not_specific>