Class: Specify::Model::AppResourceData
- Inherits:
-
Object
- Object
- Specify::Model::AppResourceData
- Includes:
- Createable, Updateable
- Defined in:
- lib/specify/models/app_resource_data.rb
Overview
AppResourceData hold data the Specify application uses (usually in the form of XML files that are stored as blobs).
An AppResourceData belongs to a #viewsetobj (an instance of Specify::Model::ViewSetObject) or AppResource (not implemented).
Instance Method Summary collapse
-
#import(data_file) ⇒ Object
Stores the contents of
data_file(typically an .xml file) as a blob in the database.
Methods included from Updateable
Methods included from Createable
Instance Method Details
#import(data_file) ⇒ Object
Stores the contents of data_file (typically an .xml file) as a blob in the database.
26 27 28 29 |
# File 'lib/specify/models/app_resource_data.rb', line 26 def import(data_file) self.data = Sequel.blob(File.read(data_file)) save end |