module Agilib::Routing::MapperExtensions

Public Instance Methods

agilib() click to toggle source
# File lib/agilib/routing.rb, line 5
def agilib
  
  if Agilib.rails4? && Rails.env.development?
    root :to => "agilib/welcome#index", :as => :agilib_root
  end

  if Agilib.use_modules[:token_authenticatable].present?
    agilib_token_authenticatable
  end

  if Agilib.use_modules[:push_notification].present?
    agilib_push_notification
  end

end
agilib_push_notification() click to toggle source
# File lib/agilib/routing.rb, line 30
def agilib_push_notification
  path = Agilib::PushNotification.device_route
  resources :devices, :path => path, :controller => "agilib/devices"
end
agilib_token_authenticatable() click to toggle source
# File lib/agilib/routing.rb, line 21
def agilib_token_authenticatable
    route = Agilib::TokenAuthenticatable.route
    devise_scope :user do 
      post    "#{route}"        => "agilib/tokens#create"
      delete  "#{route}"        => "agilib/tokens#destroy"
      get     "#{route}/check"  => "agilib/tokens#check"
    end
end