fix id issues

This commit is contained in:
Adrian Hinz 2022-03-28 11:19:03 +02:00
parent b1ab9dfb9d
commit b694dbc73d
2 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class DotationsController < ApplicationController
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
def set_dotation def set_dotation
@dotation = Dotation.find(params[:id]) @dotation = Dotation.friendly.find(params[:id])
end end
def prepare_dependencies def prepare_dependencies

View File

@ -3,6 +3,8 @@
# helper for home # helper for home
module HomeHelper module HomeHelper
def change_ammount(ammount) def change_ammount(ammount)
return '' if ammount.blank?
ret = if ammount >= 1_000_000 ret = if ammount >= 1_000_000
"#{ammount / 1_000_000} mln" "#{ammount / 1_000_000} mln"
else else