| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Since we must associate other models (e.g., classifications) to a Resource,
we use a composite model to save all changes inside a database transaction.
This approach makes it simpler to handle resources and their associations.
Work remains to fix the geolocation and reverse geolocation to ensure
these are in sync.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Turn `has_and_belongs_to_many` into `has_many :through`: now,
resources and sections are related through Classifications.
- Refactor usage of jsonb column to use ActiveRecord validations
- Attention! store_accessor:
NOTE: If you are using structured database data types (eg. PostgreSQL hstore/json, or MySQL 5.7+ json) there is no need for the
serialization provided by .store. Simply use .store_accessor instead to generate the accessor methods. Be aware that these
columns use a string keyed hash and do not allow access using a symbol.
NOTE: The default validations with the exception of uniqueness will work. For example, if you want to check for uniqueness with
hstore you will need to use a custom validation to handle it.
https://api.rubyonrails.org/classes/ActiveRecord/Store.html
|
| |
|
|
|
|
|
|
| |
This implements resource listing and pagination.
See /resources
|
|
Resources will be stored as JSON, in the (GeoJSON) :feature column.
They are assigned an UUID upon creation if they don't comme with one.
They belong to an Agent.
|