Sha256: 3c9727a13f4afaeacfe610416b3a4055d21037acd37ecd4296f62449ba4de101

Contents?: true

Size: 242 Bytes

Versions: 22

Compression:

Stored size: 242 Bytes

Contents

require 'sinatra/base'

##
# Adds to Sinatra +controller+ informations
#
class Sinatra::Request
  attr_accessor :route_obj

  def controller
    route_obj && route_obj.controller
  end
  def action
    route_obj && route_obj.action
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
padrino-core-0.13.3 lib/padrino-core/ext/sinatra.rb
padrino-core-0.13.2 lib/padrino-core/ext/sinatra.rb