Merge branch 'master' of github.com:warpc/rosa-build

This commit is contained in:
Vladimir Sharshov 2011-10-28 02:06:27 +04:00
commit 6749b0d49a
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ class Role < ActiveRecord::Base
end
a.rights = []
a.attributes = fields
Permission.delete_all(:conditions => ['role_id = ?', a.id])
Permission.delete_all(['role_id = ?', a.id])
rights.each do |con, acts|
acts.each do |act|
unless r = Right.where(:controller => con, :action => act)

View File

@ -43,7 +43,7 @@ class User < ActiveRecord::Base
update_ssh_key ssh_key_was, ssh_key
end
}
before_destroy { destroy_ssh_key(ssh_key) }
before_destroy { destroy_ssh_key(ssh_key) if ssh_key.present? }
# after_create() { UserMailer.new_user_notification(self).deliver }
class << self