Rails 5.0
This commit is contained in:
parent
2892d5272d
commit
2557645f4f
25 changed files with 367 additions and 186 deletions
|
|
@ -72,7 +72,7 @@ class User < ApplicationRecord
|
|||
self.settings.merge!(key, value)
|
||||
end if settings_attributes
|
||||
|
||||
if ActiveRecord::Type::Boolean.new.type_cast_from_user(create_ordergroup)
|
||||
if ActiveModel::Type::Boolean.new.cast(create_ordergroup)
|
||||
og = Ordergroup.new({name: name})
|
||||
og.memberships.build({user: self})
|
||||
og.save!
|
||||
|
|
@ -82,7 +82,7 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def send_welcome_mail?
|
||||
ActiveRecord::Type::Boolean.new.type_cast_from_user(send_welcome_mail)
|
||||
ActiveModel::Type::Boolean.new.cast(send_welcome_mail)
|
||||
end
|
||||
|
||||
# sorted by display name
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
%h2= t '.title'
|
||||
- if @order.errors.has_key?(:articles)
|
||||
.alert.alert-error
|
||||
= @order.errors.get(:articles).join(" ")
|
||||
= @order.errors.messages[:articles].join(" ")
|
||||
%table.table.table-hover#articleList
|
||||
%tr
|
||||
%th= check_box_tag 'checkall', "1", false, { 'data-check-all' => '#articleList' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue