The code powering m.abunchtell.com https://m.abunchtell.com
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

17 righe
349 B

  1. class StatusesController < ApplicationController
  2. before_action :authenticate_user!
  3. def create
  4. PostStatusService.new.(current_user.account, status_params[:text])
  5. redirect_to root_path
  6. rescue ActiveRecord::RecordInvalid
  7. redirect_to root_path
  8. end
  9. private
  10. def status_params
  11. params.require(:status).permit(:text)
  12. end
  13. end