serialize k, coldef[:type].constantize
end
define_method k do
- unless new_record? or @loaded_attributes.include? k
- raise ActiveModel::MissingAttributeError, "missing attribute: #{k}"
+ unless new_record? or @loaded_attributes.include? k.to_s
+ Rails.logger.debug "BUG: access non-loaded attribute #{k}"
+ # We should...
+ # raise ActiveModel::MissingAttributeError, "missing attribute: #{k}"
end
- super
+ super()
end
@attribute_info[k] = coldef
end
end
end
- @new_record = false
changes_applied
+ @new_record = false
self
end
end
end
@all_links = nil
- @new_record = false
changes_applied
+ @new_record = false
self
end
(ArvadosBase.find(owner_uuid).writable_by.include? current_user.uuid rescue false)))) or false
end
+ def deletable?
+ editable?
+ end
+
# Array of strings that are the names of attributes that can be edited
# with X-Editable.
def editable_attributes