Added job attributes, fixed seeds.rb

Added some attributes like status_changed_at. Refactored migration
files.
Changes to the migration file makes it necessary to reimport the
database: db:drop, db:create, db:migrate, db:seed
This commit is contained in:
2024-08-02 13:47:44 +02:00
parent 9a3777be44
commit c5e55eb410
16 changed files with 54 additions and 32 deletions

View File

@@ -3,7 +3,7 @@ class JobsController < ApplicationController
# GET /jobs or /jobs.json
def index
@jobs = Job.current_jobs_of_today
@jobs = Job.currently_working_on
end
# GET /jobs/1 or /jobs/1.json
@@ -23,7 +23,7 @@ class JobsController < ApplicationController
respond_to do |format|
if @job.save
format.html { redirect_to jobs_url(Job.current_jobs_of_today), notice: 'Job was successfully created.' }
format.html { redirect_to jobs_url(Job.currently_working_on), notice: 'Job was successfully created.' }
format.json { render :show, status: :created, location: @job }
else
format.html { render :new, status: :unprocessable_entity }