aboutsummaryrefslogtreecommitdiff
path: root/app/models/resource.rb
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade Rails and add StimulusJS supporthellekin2021-01-221-4/+16
|
* REUSE: Add AGPL-3.0-or-later to app/*hellekin2020-10-291-0/+4
|
* Fix Resource editionhellekin2020-10-091-2/+13
|
* Add Classifications and Resource validationshellekin2020-10-091-19/+49
| | | | | | | | | | | | | | | | - 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
* Add categories, sections, and import datahellekin2020-10-081-0/+1
|
* First pass at listing Resourceshellekin2020-10-061-0/+19
| | | | | | This implements resource listing and pagination. See /resources
* Add Resource modelhellekin2020-10-061-0/+6
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.