Module: Lesli::SystemHelper

Defined in:
app/helpers/lesli/system_helper.rb

Instance Method Summary collapse

Instance Method Details

#is_lesli_onboarding?Boolean

return true if the controller requested belongs to the administration area

Returns:

  • (Boolean)


53
54
55
# File 'app/helpers/lesli/system_helper.rb', line 53

def is_lesli_onboarding?
    lesli_controller == "onboardings"
end

#lesli_controllerObject

return the engine code of the controller that is handling the http request



36
37
38
# File 'app/helpers/lesli/system_helper.rb', line 36

def lesli_controller
    controller_path.split("/")[0]
end

#lesli_engine(property = nil) ⇒ Object

return the information about the current engine



48
49
50
# File 'app/helpers/lesli/system_helper.rb', line 48

def lesli_engine(property = nil)
    Lesli::System.engine(lesli_controller, property)
end

#lesli_instance_codeObject

retun the code of the instance builder engine example: lesli_cloud, deutsche_leibrenten, mitwerken_cloud



42
43
44
45
# File 'app/helpers/lesli/system_helper.rb', line 42

def lesli_instance_code
    return "lesli"
    Lesli::System.instance[:code]
end