Upgrade to rails 4.1
This commit is contained in:
parent
6188567931
commit
6e990fed4c
23 changed files with 179 additions and 197 deletions
|
|
@ -11,8 +11,6 @@
|
|||
//= require list.unlist
|
||||
//= require list.delay
|
||||
//= require list.reset
|
||||
//= require rails.validations
|
||||
//= require rails.validations.simple_form
|
||||
//= require i18n
|
||||
//= require i18n/translations
|
||||
//= require_self
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
after_save do
|
||||
return if settings_attributes.nil?
|
||||
settings_attributes.each do |key, value|
|
||||
value.each do |k, v|
|
||||
case v
|
||||
|
|
@ -58,7 +57,7 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
self.settings.merge!(key, value)
|
||||
end
|
||||
end if settings_attributes
|
||||
end
|
||||
|
||||
# sorted by display name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue