latest changes introduced with cursor
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| class ProjectsController < ApplicationController | ||||
|   before_action :set_project, only: %i[ show edit update destroy ] | ||||
|   before_action :set_collections, only: %i[new edit create update] | ||||
|  | ||||
|   # GET /projects or /projects.json | ||||
|   def index | ||||
| @@ -74,6 +75,11 @@ class ProjectsController < ApplicationController | ||||
|       @project = Project.find(params[:id]) | ||||
|     end | ||||
|  | ||||
|     def set_collections | ||||
|       @clients = Client.order(:company_name, :lastname, :firstname).to_a | ||||
|       @projects = Project.order(:name).to_a | ||||
|     end | ||||
|  | ||||
|     # Only allow a list of trusted parameters through. | ||||
|     def project_params | ||||
|       params.require(:project).permit( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stefan Tollkühn
					Stefan Tollkühn