Guest User

Untitled

a guest
Feb 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. ActionView::Base.send :include, SavageBeast::AuthenticationSystem
  2. ActionController::Base.send :include, SavageBeast::AuthenticationSystem
  3.  
  4. # Include your application configuration below
  5. PASSWORD_SALT = '48e45be7d489cbb0ab582d26e2168621' unless Object.const_defined?(:PASSWORD_SALT)
  6.  
  7. Module.class_eval do
  8. def expiring_attr_reader(method_name, value)
  9. class_eval(<<-EOS, __FILE__, __LINE__)
  10. def #{method_name}
  11. class << self; attr_reader :#{method_name}; end
  12. @#{method_name} = eval(%(#{value}))
  13. end
  14. EOS
  15. end
  16. end
  17.  
  18. begin
  19. # require 'gettext/rails'
  20. # GetText.locale = "en" # Change this to your preference language
  21. #puts "GetText found!"
  22. #rescue MissingSourceFile, LoadError
  23. #puts "GetText not found. Using English."
  24. class ActionView::Base
  25. def _(s)
  26. s
  27. end
  28. end
  29. end
Add Comment
Please, Sign In to add comment