Skip to content

Commit

Permalink
Remove the old new and create for CoffeeShop
Browse files Browse the repository at this point in the history
  • Loading branch information
amree committed Sep 1, 2024
1 parent 5b9b925 commit 26fbed6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 395 deletions.
20 changes: 0 additions & 20 deletions app/controllers/coffee_shops_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,6 @@ def show
ahoy.track "View Coffee Shop", id: @coffee_shop.id, name: @coffee_shop.name
end

def new
@coffee_shop = CoffeeShop.new
@coffee_shop.coffee_shop_tags.build
end

def create
@coffee_shop = CoffeeShop.new(coffee_shop_create_params)
@coffee_shop.submitter = current_user

respond_to do |format|
if @coffee_shop.save
format.html { redirect_to new_coffee_shop_path, notice: success_message }
format.json { render :show, status: :created, location: @coffee_shop }
else
format.html { render :new, status: :unprocessable_entity }
format.json { render json: @coffee_shop.errors, status: :unprocessable_entity }
end
end
end

def edit
end

Expand Down
Loading

0 comments on commit 26fbed6

Please sign in to comment.