Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
show all
- Defined in:
- lib/ecrire/app/controllers/application_controller.rb
Instance Method Summary
collapse
Instance Method Details
#current_user ⇒ Object
8
9
10
|
# File 'lib/ecrire/app/controllers/application_controller.rb', line 8
def current_user
warden.user
end
|
#posts ⇒ Object
16
17
18
|
# File 'lib/ecrire/app/controllers/application_controller.rb', line 16
def posts
@posts ||= Post.all
end
|
#signed_in? ⇒ Boolean
12
13
14
|
# File 'lib/ecrire/app/controllers/application_controller.rb', line 12
def signed_in?
!warden.user.nil?
end
|