You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
371 B

class StatusesController < ApplicationController
layout 'dashboard'
before_action :authenticate_user!
def create
PostStatusService.new.(current_user.account, status_params[:text])
redirect_to root_path
rescue ActiveRecord::RecordInvalid
redirect_to root_path
end
private
def status_params
params.require(:status).permit(:text)
end
end