Created
July 3, 2019 17:46
-
-
Save gramos/720d067e756980997522f25588aaa6ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BorramesController < ApplicationController | |
before_action :set_borrame, only: [:show, :edit, :update, :destroy] | |
# GET /borrames | |
# GET /borrames.json | |
def index | |
@borrames = Borrame.all | |
end | |
# GET /borrames/1 | |
# GET /borrames/1.json | |
def show | |
end | |
# GET /borrames/new | |
def new | |
@borrame = Borrame.new | |
end | |
# GET /borrames/1/edit | |
def edit | |
end | |
# POST /borrames | |
# POST /borrames.json | |
def create | |
@borrame = Borrame.new(borrame_params) | |
respond_to do |format| | |
if @borrame.save | |
format.html { redirect_to @borrame, notice: 'Borrame was successfully created.' } | |
format.json { render :show, status: :created, location: @borrame } | |
else | |
format.html { render :new } | |
format.json { render json: @borrame.errors, status: :unprocessable_entity } | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment