Top Level Namespace
Defined Under Namespace
Modules: Loco
Instance Method Summary collapse
Instance Method Details
#connect ⇒ Object
3 4 5 6 7 8 |
# File 'lib/generators/loco/file_injector/templates/connection.rb', line 3 def connect unless current_user || current_admin # loco_permissions should be the same as in application_controller.rb # + SecureRandom.uuid is mandatory at 1st position self. = [SecureRandom.uuid, current_user, current_admin] end |
#loco_permissions ⇒ Object
1 2 3 4 5 6 7 |
# File 'lib/generators/loco/file_injector/templates/application_controller.rb', line 1 def # specify an array of method names which you use to determine # if given resource is signed-in # e.g. # [current_user, current_admin] [] end |