add survey
This commit is contained in:
@@ -1,2 +1,18 @@
|
||||
class Origami::SurveysController < ApplicationController
|
||||
def new
|
||||
@survey = Account.new
|
||||
end
|
||||
|
||||
def create
|
||||
@survey = Account.new(survey_params)
|
||||
respond_to do |format|
|
||||
if @survey.save
|
||||
format.html { redirect_to settings_accounts_url, notice: 'survey was successfully created.' }
|
||||
format.json { render :index, status: :created, location: @survey }
|
||||
else
|
||||
format.html { render :new }
|
||||
format.json { render json: settings_accounts_url.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user