Class: Nightlight::ActivitiesController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Nightlight::ActivitiesController
- Defined in:
- app/controllers/nightlight/activities_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/nightlight/activities_controller.rb', line 7 def create @status = @page.activities.status.new activity_params @status.user = current_user if @status.save flash[:success] = "Status updated." redirect_to page_url(@page) else flash.now[:error] = @status.errors..first render 'nightlight/pages/show' end end |