Class: Projects::UpdatesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Projects::UpdatesController
- Defined in:
- app/controllers/projects/updates_controller.rb
Instance Method Summary collapse
Instance Method Details
#collection ⇒ Object
25 26 27 |
# File 'app/controllers/projects/updates_controller.rb', line 25 def collection @updates ||= end_of_association_chain.visible_to(current_user) end |
#create ⇒ Object
16 17 18 19 |
# File 'app/controllers/projects/updates_controller.rb', line 16 def create @update = parent.updates.create(params[:update].merge!(user: current_user)) render @update end |
#destroy ⇒ Object
21 22 23 |
# File 'app/controllers/projects/updates_controller.rb', line 21 def destroy destroy!{|format| return index } end |
#index ⇒ Object
12 13 14 |
# File 'app/controllers/projects/updates_controller.rb', line 12 def index render end_of_association_chain.page(params[:page]).per(3) end |
#show ⇒ Object
8 9 10 |
# File 'app/controllers/projects/updates_controller.rb', line 8 def show render resource end |