app/controllers/api/v1/passages_controller.rb
# Returns a JSON-encoded Array of all the selected rows.
# Each array element is a JSON-encoded hash of a single row.
# The keys of the Hash are the attributes as string.
#
# === Additional params:
# - meeting_id: the Meeting.id for passage filtering
# - team_id:    the Team.id for passage filtering
#
Returns a JSON-encoded Array of all the selected rows.
Each array element is a JSON-encoded hash of a single row.
The keys of the Hash are the attributes as string.

Additional params:
meeting_id: the Meeting.id for passage filtering
team_id:    the Team.id for passage filtering
Returns a JSON - encoded Array of all the selected rows . Each array element is a JSON - encoded hash of a single row . The keys of the Hash are the attributes as string . Additional params : meeting_id : the Meeting . id for passage filtering team_id : the Team . id for passage filtering
def index
    if params[:meeting_id] && params[:team_id]
      @passages = Passage.includes(:team, :meeting).where(
        'meetings.id' => params[:meeting_id],
        'teams.id' => params[:team_id]
      ).to_a
    else
      @passages = []
    end
    render status: 200, json: @passages
  end
def index if params [ :meeting_id ] && params [ :team_id ] @passages = Passage . includes ( :team , :meeting ) . where ( 'meetings.id' => params [ :meeting_id ] , 'teams.id' => params [ :team_id ] ) . to_a else @passages = [ ] end render status : 200 , json : @passages end
Returns a JSON-encoded Array of all the selected rows.
Returns a JSON - encoded Array of all the selected rows .