This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2016-03-21 18:26:47 +01:00
|
|
|
class StatusesController < ApplicationController
|
|
|
|
before_action :authenticate_user!
|
|
|
|
|
|
|
|
def create
|
2016-03-25 02:13:30 +01:00
|
|
|
PostStatusService.new.(current_user.account, status_params[:text])
|
2016-03-21 18:26:47 +01:00
|
|
|
redirect_to root_path
|
|
|
|
rescue ActiveRecord::RecordInvalid
|
|
|
|
redirect_to root_path
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def status_params
|
|
|
|
params.require(:status).permit(:text)
|
|
|
|
end
|
|
|
|
end
|