Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Defined in:
- lib/generators/squeezer/templates/app/controllers/application_controller.rb
Overview
Filters added to this controller apply to all controllers in the application. Likewise, all the methods added will be available for all controllers.
Direct Known Subclasses
CommentsController, ForumsController, TopicsController, UsersController
Instance Method Summary collapse
Instance Method Details
#latests ⇒ Object
12 13 14 |
# File 'lib/generators/squeezer/templates/app/controllers/application_controller.rb', line 12 def latests Blog.paginate :page =>1,:per_page=>5, :order => 'created_at DESC' end |
#site ⇒ Object
16 17 18 |
# File 'lib/generators/squeezer/templates/app/controllers/application_controller.rb', line 16 def site return Site.last end |