mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 12:18:06 +01:00
18 lines
380 B
Ruby
18 lines
380 B
Ruby
class StatusesController < ApplicationController
|
|
layout 'dashboard'
|
|
|
|
before_action :authenticate_user!
|
|
|
|
def create
|
|
status = 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
|