diff --git a/app/controllers/animals_controller.rb b/app/controllers/animals_controller.rb index de2b749..2d461a4 100644 --- a/app/controllers/animals_controller.rb +++ b/app/controllers/animals_controller.rb @@ -41,7 +41,7 @@ def sort redirect_to animal_path(@animal, :sort_by => @sort_by) end -# TODO: fix so does not delete if have doses? +# TODO: fix so does not delete if have doses?... you could do a dependent destroy in the model so it will delete animals with doses def destroy if @animal.doses flash[:alert] = 'You cannot delete animals that have doses' diff --git a/app/views/animals/edit.html.erb b/app/views/animals/edit.html.erb index 15bb358..236170d 100644 --- a/app/views/animals/edit.html.erb +++ b/app/views/animals/edit.html.erb @@ -21,3 +21,5 @@ <% end %> <%# TODO: Fix view with labels while still using form - JS? %> + + diff --git a/app/views/animals/index.html.erb b/app/views/animals/index.html.erb index 1b22bbf..217159c 100644 --- a/app/views/animals/index.html.erb +++ b/app/views/animals/index.html.erb @@ -190,3 +190,4 @@ + diff --git a/db/schema.rb b/db/schema.rb index 52b7d9f..c33db77 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151119051352) do +ActiveRecord::Schema.define(version: 20151118004355) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -42,7 +42,6 @@ t.string "route" t.string "restrictions" t.text "notes" - t.string "image_url" end create_table "roles", force: :cascade do |t|