Class: TentD::Model::Permission
- Inherits:
-
Object
- Object
- TentD::Model::Permission
- Includes:
- DataMapper::Resource
- Defined in:
- lib/tentd/model/permission.rb
Class Method Summary collapse
Class Method Details
.copy(from, to) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/tentd/model/permission.rb', line 18 def self.copy(from, to) from..each do || attrs = .attributes attrs.delete(:id) to..create(attrs) end to.update(:public => from.public) end |