Class: Deals::CategoriesController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Deals::CategoriesController
- Defined in:
- app/controllers/categories_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 7 |
# File 'app/controllers/categories_controller.rb', line 4 def index @categories = Category.all.map { |c| { 'id' => c.id, :name => c.name, :slug => c.slug} } respond_with(@categories) end |