Sha256: 62d7d9273724046e712edbfaea1e4d615dd92e7ed87139e06f5e3a8c1e31fe84
Contents?: true
Size: 790 Bytes
Versions: 4
Compression:
Stored size: 790 Bytes
Contents
require_dependency 'tasuku/application_controller' module Tasuku class Taskables::URL::ResponsesController < ApplicationController include Concerns::Redirectable before_action :set_request def create response = @request.responses.new response_params response.author = send Tasks.config.author respond_to do |format| if response.save format.html { redirect_to redirect_path_for(response) } else format.html { redirect_to :back, alert: response.errors.full_messages.to_sentence } end end end private def response_params params.require(:taskables_url_response).permit(:url) end def set_request @request = Taskables::URL::Request.find params[:request_id] end end end
Version data entries
4 entries across 4 versions & 1 rubygems