The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

17 satır
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