Skip to content

Commit

Permalink
adds the shortcut to the item
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserx committed Jul 8, 2012
1 parent 197f695 commit 9d32b93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/items_controller.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -114,4 +114,9 @@ def check_out
redirect_to @item, error: 'Item is not checked in' redirect_to @item, error: 'Item is not checked in'
end end
end end

def go
@item = Item.find_by_tag_number!(params[:tag_number])
redirect_to @item
end
end end
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@


get "pages/privacy" get "pages/privacy"


match ':tag_number' => 'items#go'

# The priority is based upon order of creation: # The priority is based upon order of creation:
# first created -> highest priority. # first created -> highest priority.


Expand Down

0 comments on commit 9d32b93

Please sign in to comment.