This alert
should not be executed after executing the filters method:
def filtros
@apps= App.where(rol: params[:rol])
.or(App.where(plataforma:params[:plataforma])
.or(App.where(area: params[:area])))
respond_to do |format|
format.js{ render :json => @apps }
end
end
Vista:
app/views/apps/filtros.js.erb
alert( "message" );