jdn7d

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

edit.erb

Edit <%= @trip.location %>

<%= button_to "Delete trip", trip_path(@trip), method: :delete %>

<%= link_to "Cancel", trip_path(@trip) %>

trips_controller.rb

def update 
    if @trip.update(trip_params) 
       redirect_to trip_path(@trip)
    else
       render :edit
    end
 end

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.