move homies under gang
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
class HomiesController < ApplicationController
|
||||
def index
|
||||
json_response(Homie.all.order(importance: :desc, name: :asc))
|
||||
homies = Homie.where(gang: params[:gang_id]).order(importance: :desc, name: :asc)
|
||||
# json_response(Homie.all.order(importance: :desc, name: :asc))
|
||||
json_response homies
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -23,7 +25,8 @@ class HomiesController < ApplicationController
|
||||
|
||||
def info
|
||||
importance = params[:importance].present? ? params[:importance].to_i : -1
|
||||
json_response(Homie.info(importance))
|
||||
gang = params[:gang_id]
|
||||
json_response(Homie.info(importance, gang))
|
||||
end
|
||||
|
||||
def settle
|
||||
|
||||
Reference in New Issue
Block a user