class WitAiParseModelsController
typed: false
Public Instance Methods
create()
click to toggle source
POST /wit_ai_parse_models POST /wit_ai_parse_models.json
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 27 def create @wit_ai_parse_model = WitAiParseModel.new(wit_ai_parse_model_params) respond_to do |format| if @wit_ai_parse_model.save format.html { redirect_to @wit_ai_parse_model, notice: 'Wit ai parse model was successfully created.' } format.json { render :show, status: :created, location: @wit_ai_parse_model } else format.html { render :new } format.json { render json: @wit_ai_parse_model.errors, status: :unprocessable_entity } end end end
destroy()
click to toggle source
DELETE /wit_ai_parse_models/1 DELETE /wit_ai_parse_models/1.json
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 57 def destroy @wit_ai_parse_model.destroy respond_to do |format| format.html { redirect_to wit_ai_parse_models_url, notice: 'Wit ai parse model was successfully destroyed.' } format.json { head :no_content } end end
edit()
click to toggle source
GET /wit_ai_parse_models/1/edit
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 22 def edit end
index()
click to toggle source
GET /wit_ai_parse_models GET /wit_ai_parse_models.json
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 7 def index @wit_ai_parse_models = WitAiParseModel.all end
new()
click to toggle source
GET /wit_ai_parse_models/new
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 17 def new @wit_ai_parse_model = WitAiParseModel.new end
show()
click to toggle source
GET /wit_ai_parse_models/1 GET /wit_ai_parse_models/1.json
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 13 def show end
update()
click to toggle source
PATCH/PUT /wit_ai_parse_models/1 PATCH/PUT /wit_ai_parse_models/1.json
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 43 def update respond_to do |format| if @wit_ai_parse_model.update(wit_ai_parse_model_params) format.html { redirect_to @wit_ai_parse_model, notice: 'Wit ai parse model was successfully updated.' } format.json { render :show, status: :ok, location: @wit_ai_parse_model } else format.html { render :edit } format.json { render json: @wit_ai_parse_model.errors, status: :unprocessable_entity } end end end
Private Instance Methods
set_wit_ai_parse_model()
click to toggle source
Use callbacks to share common setup or constraints between actions.
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 67 def set_wit_ai_parse_model @wit_ai_parse_model = WitAiParseModel.find(params[:id]) end
wit_ai_parse_model_params()
click to toggle source
Never trust parameters from the scary internet, only allow the white list through.
# File server/redux-os/app/controllers/wit_ai_parse_models_controller.rb, line 72 def wit_ai_parse_model_params params.require(:wit_ai_parse_model).permit(:wit_ai_client_token, :wit_ai_server_token) end