diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index b2868693..5bc3a23c 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -71,6 +71,10 @@ module ItemsHelper sprintf(NeoitemsURLFormat, CGI::escape(item.name)) end + def your_items_path + user_signed_in? ? user_closet_hangers_path(current_user) : login_path + end + private def build_on_pet_types(species, special_color=nil, &block) diff --git a/app/views/items/index.html.haml b/app/views/items/index.html.haml index 999a3096..f02d4fa3 100644 --- a/app/views/items/index.html.haml +++ b/app/views/items/index.html.haml @@ -20,6 +20,11 @@ %dd returns any item with the word "kreludor" and the phrase "altador cup" in it, but not the word "background" + %dt hat user:owns + %dd + returns + = link_to 'items that you own', your_items_path + with the word "hat" %dt blue is:nc %dd returns any NC Mall item with the word "blue" in it %dt collar -is:pb