Guest User

Untitled

a guest
Feb 19th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. class Merb::Controller < Merb::AbstractController
  2.  
  3. class_inheritable_accessor :_hidden_actions, :_shown_actions
  4. self._hidden_actions ||= []
  5. self._shown_actions ||= []
  6.  
  7. class_inheritable_accessor :_subclasses, :_session_id_key, :_session_secret_key, :_session_expiry, :_session_cookie_domain
  8. self._subclasses = Set.new
  9.  
  10. def self.subclasses_list() _subclasses end
  11.  
  12. self._session_secret_key = nil
  13. self._session_id_key = Merb::Config[:session_id_key] || '_session_id'
  14. self._session_expiry = Merb::Config[:session_expiry] || Merb::Const::WEEK * 2
  15. self._session_cookie_domain = Merb::Config[:session_cookie_domain]
  16.  
  17. include Merb::ResponderMixin
  18. include Merb::ControllerMixin
  19. include Merb::AuthenticationMixin
  20.  
  21. attr_accessor :route
  22.  
  23. class << self
  24.  
  25. # ==== Parameters
  26. # klass<Merb::Controller>::
  27. # The Merb::Controller inheriting from the base class.
  28. def inherited(klass)
  29. _subclasses << klass.to_s
  30. super
  31. klass._template_root = Merb.dir_for(:view) unless self._template_root
  32. end
Add Comment
Please, Sign In to add comment