diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/taxonomies/filter_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/taxonomies_controller.rb | 11 | ||||
-rw-r--r-- | app/controllers/welcome_controller.rb | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/app/controllers/taxonomies/filter_controller.rb b/app/controllers/taxonomies/filter_controller.rb new file mode 100644 index 0000000..ad3514c --- /dev/null +++ b/app/controllers/taxonomies/filter_controller.rb @@ -0,0 +1,7 @@ +class Taxonomies::FilterController < ApplicationController + # GET /taxonomies/:id/filter + def show + @taxonomy = Taxonomy.find_by(uuid: params[:id]) + render partial: "taxonomies/filter/taxonomy" + end +end diff --git a/app/controllers/taxonomies_controller.rb b/app/controllers/taxonomies_controller.rb new file mode 100644 index 0000000..f33595a --- /dev/null +++ b/app/controllers/taxonomies_controller.rb @@ -0,0 +1,11 @@ +class TaxonomiesController < ApplicationController + # GET /taxonomies + def index + @taxonomies = current_agent.taxonomies.order(:uuid).page params[:page] + end + + # GET /taxonomies/:id + def show + @taxonomy = Taxonomy.find_by(uuid: params[:id]) + end +end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index e7743e8..85246e5 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -6,6 +6,7 @@ class WelcomeController < ApplicationController # GET / def index @map = Map.first + @taxonomy = @map.taxonomy @resources = Resource.order(:uuid).page params[:page] Rails.logger.info "WECLOME ///// #{@resources&.count || 0}" end |