diff --git a/app/helpers/outfits_helper.rb b/app/helpers/outfits_helper.rb index ad7a9e05..50e08068 100644 --- a/app/helpers/outfits_helper.rb +++ b/app/helpers/outfits_helper.rb @@ -10,20 +10,6 @@ module OutfitsHelper :user_link => link_to(user.name, user_contributions_path(user)), :contributed_description => contributed_description(contributed, false) end - - def link_to_edit_outfit(content_or_outfit, outfit_or_options, options={}, &block) - if block_given? - content = capture_haml(&block) - outfit = content_or_outfit - options = outfit_or_options - else - content = content_or_outfit - outfit = outfit_or_options - end - query = outfit.to_query - query << "&outfit=#{outfit.id}" if user_signed_in? && outfit.user_id == current_user.id - link_to content, wardrobe_path(:anchor => query), options - end def search_helper(filter, standard_key) key = translate("#{filter}.key") diff --git a/app/models/outfit.rb b/app/models/outfit.rb index 2226e82a..ab8dda05 100644 --- a/app/models/outfit.rb +++ b/app/models/outfit.rb @@ -83,18 +83,6 @@ class Outfit < ApplicationRecord pet_state.pet_type.species_id end - def to_query - ids = self.worn_and_unworn_item_ids - - { - :closet => ids[:worn] + ids[:unworn], - :color => color_id, - :objects => ids[:worn], - :species => species_id, - :state => pet_state_id - }.to_query - end - def worn_and_unworn_item_ids {:worn => [], :unworn => []}.tap do |output| item_outfit_relationships.each do |rel| diff --git a/app/views/outfits/_outfit.html.haml b/app/views/outfits/_outfit.html.haml index ff97db75..3734e284 100644 --- a/app/views/outfits/_outfit.html.haml +++ b/app/views/outfits/_outfit.html.haml @@ -7,7 +7,7 @@ = link_to outfit.name, outfit, :class => 'outfit-name' %footer - = link_to_edit_outfit t('.edit'), outfit, :class => 'outfit-edit-link' + = link_to t('.edit'), outfit, :class => 'outfit-edit-link' = button_to t('.delete'), outfit, :method => 'delete', :class => 'outfit-delete-button', :confirm => t('.delete_confirmation',