lib/card.rb in trollolo-0.0.14 vs lib/card.rb in trollolo-0.1.0
- old
+ new
@@ -24,10 +24,10 @@
init_data(board_data, card_id)
end
def init_data(board_data, card_id)
@board_data = board_data
- @card_data = @board_data["cards"].select{|c| c["id"] == card_id}.first
+ @card_data = @board_data["cards"].find{|c| c["id"] == card_id}
end
def as_json
JSON.pretty_generate(@card_data)
end