Module: Lockdown::Frameworks::Rails::Environment
- Defined in:
- lib/lockdown/frameworks/rails.rb
Overview
class block
Instance Method Summary collapse
- #controller_class_name(str) ⇒ Object
- #controller_parent ⇒ Object
- #init_file ⇒ Object
- #project_root ⇒ Object
- #view_helper ⇒ Object
Instance Method Details
#controller_class_name(str) ⇒ Object
65 66 67 68 69 70 71 72 |
# File 'lib/lockdown/frameworks/rails.rb', line 65 def controller_class_name(str) str = "#{str}Controller" if str.include?("__") str.split("__").collect{|p| Lockdown.camelize(p)}.join("::") else Lockdown.camelize(str) end end |
#controller_parent ⇒ Object
57 58 59 |
# File 'lib/lockdown/frameworks/rails.rb', line 57 def controller_parent ::ActionController::Base end |
#init_file ⇒ Object
53 54 55 |
# File 'lib/lockdown/frameworks/rails.rb', line 53 def init_file "#{project_root}/lib/lockdown/init.rb" end |
#project_root ⇒ Object
49 50 51 |
# File 'lib/lockdown/frameworks/rails.rb', line 49 def project_root ::RAILS_ROOT end |
#view_helper ⇒ Object
61 62 63 |
# File 'lib/lockdown/frameworks/rails.rb', line 61 def view_helper ::ActionView::Base end |