sumeetjain / outcomes-tracker

0 stars 0 forks source link

Fix error when creating new offer #57

Closed sumeetjain closed 8 years ago

sumeetjain commented 8 years ago
2016-08-01T18:39:34.124252+00:00 app[web.1]: ActionController::UnpermittedParameters (found unpermitted parameter: salary):
2016-08-01T18:39:34.124254+00:00 app[web.1]:   app/controllers/offers_controller.rb:61:in `offer_params'
2016-08-01T18:39:34.124255+00:00 app[web.1]:   app/controllers/offers_controller.rb:29:in `create'`
halfghaninne commented 8 years ago

I want to make sure I'm understanding our schema correctly. Salaries should be related to both Offers AND Positions right?

Right now the salary table schema is:

  create_table "salaries", force: :cascade do |t|
    t.integer  "amount"
    t.integer  "rate"
    t.datetime "created_at",  null: false
    t.datetime "updated_at",  null: false
    t.integer  "position_id"
  end

How should I be linking an Offer to a Salary? I know we have had this conversation before but I can't easily locate a written record of it.

sumeetjain commented 8 years ago

I don't remember either. For now, just add offer_id as another field to Salary.

halfghaninne commented 8 years ago

Thanks! Addressing this in my mega-branch for #71