Upgrade to rails 4.1
This commit is contained in:
parent
6188567931
commit
6e990fed4c
23 changed files with 179 additions and 197 deletions
|
|
@ -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}")
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue