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
if params[:order] == 'random' || params[:order].blank?
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
params[:random_seed] = nil
end

View File

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

View File

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

View File

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