Open Sahhm opened 9 years ago
=
in HTML: https://github.com/Sahhm/06-23-sinatra-golfproject/blob/master/views/courses/add_course_form.erb#L3The database module methods are in a file in the models folder called ClassMethods.rb
id
, which is a primary key, you're guaranteed to only have one row returned. So instead of returning an array containing the one object, just return the one object alone. (See my thread with Other Sam™ for more thoughts, if you want details: https://github.com/samstephen/06-23-cookcolab/issues/31)all
method return objects instead of hashes.
Created the Course model and views for the CRUD methods.