class BeispieleController

Public Instance Methods

create() click to toggle source

POST /beispiele POST /beispiele.json

# File controllers/beispiele_controller.rb, line 42
def create
  @beispiel = Beispiel.new(params[:beispiel])

  respond_to do |format|
    if @beispiel.save
      format.html { redirect_to @beispiel, notice: 'Beispiel was successfully created.' }
      format.json { render json: @beispiel, status: :created, location: @beispiel }
    else
      format.html { render action: "new" }
      format.json { render json: @beispiel.errors, status: :unprocessable_entity }
    end
  end
end
destroy() click to toggle source

DELETE /beispiele/1 DELETE /beispiele/1.json

# File controllers/beispiele_controller.rb, line 74
def destroy
  @beispiel = Beispiel.find(params[:id])
  @beispiel.destroy

  respond_to do |format|
    format.html { redirect_to beispiele_url }
    format.json { head :no_content }
  end
end
edit() click to toggle source

GET /beispiele/1/edit

# File controllers/beispiele_controller.rb, line 36
def edit
  @beispiel = Beispiel.find(params[:id])
end
index() click to toggle source

GET /beispiele GET /beispiele.json

# File controllers/beispiele_controller.rb, line 4
def index
  @beispiele = Beispiel.all

  respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @beispiele }
  end
end
new() click to toggle source

GET /beispiele/new GET /beispiele/new.json

# File controllers/beispiele_controller.rb, line 26
def new
  @beispiel = Beispiel.new

  respond_to do |format|
    format.html # new.html.erb
    format.json { render json: @beispiel }
  end
end
show() click to toggle source

GET /beispiele/1 GET /beispiele/1.json

# File controllers/beispiele_controller.rb, line 15
def show
  @beispiel = Beispiel.find(params[:id])

  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @beispiel }
  end
end
update() click to toggle source

PUT /beispiele/1 PUT /beispiele/1.json

# File controllers/beispiele_controller.rb, line 58
def update
  @beispiel = Beispiel.find(params[:id])

  respond_to do |format|
    if @beispiel.update_attributes(params[:beispiel])
      format.html { redirect_to @beispiel, notice: 'Beispiel was successfully updated.' }
      format.json { head :no_content }
    else
      format.html { render action: "edit" }
      format.json { render json: @beispiel.errors, status: :unprocessable_entity }
    end
  end
end