Module: Lockdown::Frameworks::Rails::Environment

Defined in:
lib/lockdown/frameworks/rails.rb

Overview

class block

Instance Method Summary collapse

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_parentObject



57
58
59
# File 'lib/lockdown/frameworks/rails.rb', line 57

def controller_parent
  ::ActionController::Base
end

#init_fileObject



53
54
55
# File 'lib/lockdown/frameworks/rails.rb', line 53

def init_file
  "#{project_root}/lib/lockdown/init.rb"
end

#project_rootObject



49
50
51
# File 'lib/lockdown/frameworks/rails.rb', line 49

def project_root
  ::RAILS_ROOT
end

#view_helperObject



61
62
63
# File 'lib/lockdown/frameworks/rails.rb', line 61

def view_helper
  ::ActionView::Base 
end