This problem has me stumped.
When deployed to Heroku i got the error but not locally which would indicate a problem with the db
Line its referring to
class StaticPagesController < ApplicationController
def home
if logged_in?
@project = current_user.projects.build if logged_in?
**@timetable = current_user.timetables.build if logged_in?**
@feed_items = current_user.feed.paginate(page: params[:page]).reorder("project_due_date ASC")
@feed_items3 = current_user.feed3.paginate(page: params[:page], :per_page => 1)
end
end
I've tried
Heroku run db:migrate and Heroku restart
Still same error
It may be the fact that i have the schema wrong somehow but when woud that affect Heroku but not localhost?
URL = https://radiant-sea-5676.herokuapp.com/
Edit - It seems to work when not logged in on Heroku but crashes when logged in. Works either way on localhost.
Edit Again - Checking the schema through Heroku shows there is no User iD column and no Index setup for the User iD even after a migrate.
create_table "timetables", force: :cascade do |t|
t.string "name", limit: 255
t.string "attachment", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end