Closed bjfish closed 8 years ago
Hi! Thanks for the PR!
I'm also learning Ecto so any suggestion is really appreciated :)
Do you think we can move that query to the Card module so we can cleanup the controller and use something like:
card = Card |> Card.get_by_user_and_board(card_id, user_id, board_id)
I 'd rather prefer having such query functionality in the Card so it can be reused elsewhere...
@bigardone Yes, I moved the query and updated the controller.
Awesome! Thank you very much, merging!
I was modifying this query to help me learn Ecto. I changed it so it now only does 2 SQL queries for this action. Feel free to use this change if you would like.