1
0
postdoc/app/controllers/application_controller.rb

16 lines
345 B
Ruby
Raw Permalink Normal View History

2020-12-06 20:49:03 +01:00
class ApplicationController < ActionController::Base
http_basic_authenticate_with(
name: Rails.application.secrets.username,
password: Rails.application.secrets.password)
helper_method :mailboxes, :current_mailbox
def mailboxes
@mailboxes ||= Mailbox.all.order(name: :asc)
end
def current_mailbox
@mailbox
end
end