This class is used to store configuration options in the back-end database. Each Configuraiton object has a :name and a :value. Some configuration parameters can be accessed through the helper methods provided in this class.
Methods
Public Class methods
Helper method to retrieve the value of the ‘revision’ setting and increment it by one.
[ show source ]
# File app/models/configuration.rb, line 14
14: def Configuration.increment_revision
15: revision = Configuration.find_by_name('revision')
16: revision.value = revision.value.to_i + 1
17: revision.save
18: end
[ show source ]
# File app/models/configuration.rb, line 21
21: def Configuration.password
22: Configuration.find_by_name('password').value
23: end
Retrieve the value of the configuration setting whose name is ‘revision‘
[ show source ]
# File app/models/configuration.rb, line 8
8: def Configuration.revision
9: Configuration.find_by_name('revision').value
10: end
Retrieve the name of the Node used to associate file uploads.
[ show source ]
# File app/models/configuration.rb, line 26
26: def Configuration.uploadsNode
27: Configuration.find_by_name('uploads_node').value
28: end