Upgrade to rails 4.1

This commit is contained in:
wvengen 2014-11-21 14:37:56 +01:00
parent 6188567931
commit 6e990fed4c
23 changed files with 179 additions and 197 deletions

View file

@ -174,8 +174,8 @@ module ApplicationHelper
def bootstrap_flash_patched
flash_messages = []
flash.each do |type, message|
type = :success if type == :notice
type = :error if type == :alert
type = :success if type == 'notice'
type = :error if type == 'alert'
text = content_tag(:div,
content_tag(:button, I18n.t('ui.marks.close').html_safe, :class => "close", "data-dismiss" => "alert") +
message, :class => "alert fade in alert-#{type}")

View file

@ -12,7 +12,7 @@ module DeliveriesHelper
def articles_for_select2(articles, except = [], &block)
articles = articles.reorder('articles.name ASC')
articles.reject! {|a| not except.index(a.id).nil? } if except
articles = articles.reject {|a| not except.index(a.id).nil? } if except
block_given? or block = Proc.new {|a| "#{a.name} (#{number_to_currency a.price}/#{a.unit})" }
articles.map do |a|
{:id => a.id, :text => block.call(a)}