Merge branch 'master' into legislation-module-stable

This commit is contained in:
Amaia Castro
2017-02-08 12:24:40 +01:00
4 changed files with 5 additions and 1 deletions

View File

@@ -77,7 +77,8 @@ module Budgets
def set_random_seed def set_random_seed
if params[:order] == 'random' || params[:order].blank? if params[:order] == 'random' || params[:order].blank?
params[:random_seed] ||= rand(99)/100.0 params[:random_seed] ||= rand(99)/100.0
Budget::Investment.connection.execute "select setseed(#{params[:random_seed]})" seed = Float(params[:random_seed]) rescue 0
Budget::Investment.connection.execute("select setseed(#{seed})")
else else
params[:random_seed] = nil params[:random_seed] = nil
end end

View File

@@ -14,6 +14,7 @@
<div class="row"> <div class="row">
<div class="small-12 medium-6 column"> <div class="small-12 medium-6 column">
<%= check_box_tag :unfeasible, "1", params[:unfeasible].present? %> <%= check_box_tag :unfeasible, "1", params[:unfeasible].present? %>
<%= t("admin.budget_investments.search_unfeasible") %>
</div> </div>
</div> </div>

View File

@@ -153,6 +153,7 @@ en:
tags: Tags tags: Tags
tags_placeholder: "Write the tags you want separated by commas (,)" tags_placeholder: "Write the tags you want separated by commas (,)"
undefined: Undefined undefined: Undefined
search_unfeasible: Search unfeasible
comments: comments:
index: index:
filter: Filter filter: Filter

View File

@@ -153,6 +153,7 @@ es:
tags: Etiquetas tags: Etiquetas
tags_placeholder: "Escribe las etiquetas que desees separadas por comas (,)" tags_placeholder: "Escribe las etiquetas que desees separadas por comas (,)"
undefined: Sin definir undefined: Sin definir
search_unfeasible: Buscar inviables
comments: comments:
index: index:
filter: Filtro filter: Filtro