Created
March 31, 2014 17:21
-
-
Save davinmsu/9897342 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def market | |
| if params[:order_id] && params[:order_status] | |
| order = Order.find(params[:order_id]) | |
| if params[:order_status] == :declined | |
| current_user.decline_order order # исключает заказ из списка доступных | |
| else | |
| current_user.accept_like order # записывает исполнение заказа, исключает его из доступных заказов | |
| end | |
| end | |
| @order == current_user.get_avaliable_order # возвращает доступный для этого пользователя заказ | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment