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:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user