Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/animals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions app/views/animals/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
<% end %>

<%# TODO: Fix view with labels while still using form - JS? %>

<!-- you created a _form so you could make this dryer by doing render form -->
1 change: 1 addition & 0 deletions app/views/animals/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,4 @@
</ul>
</div>
</div>
<!-- very cool animations -->
3 changes: 1 addition & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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|
Expand Down