So there are 2 relevant branches. notifications and shipping_options.
I checked notifications out of master, then made 2 significant database changes:
- Created
GeneralNoticemodel - Modified existing
Noticemodel, by adding a booleandismissed
Then shipping_options was also checked out of master at the same state as notifications, and no database changes were made, only minor code changes.
I ran rake db:migrate the first time switching from notifications to shipping_options and the same vice versa.
At the moment, when I am in notifications, and run rails c I get the following:
2.0.0-p451 :001 > Notice
=> Notice(id: integer, title: string, description: text, created_at: datetime, updated_at: datetime, kind: string, general_notice_id: integer, shop_id: integer, dismissed: boolean)
2.0.0-p451 :002 > GeneralNotice
=> GeneralNotice(id: integer, title: string, description: text, created_at: datetime, updated_at: datetime)
2.0.0-p451 :003 >
- Notice has
dismissed(as expected) - GeneralNotice exists (as expected)
Then i switch to shipping_options and I hope you have been following because here comes the confusing part...
2.0.0-p451 :001 > Notice
=> Notice(id: integer, title: string, description: text, created_at: datetime, updated_at: datetime, kind: string, general_notice_id: integer, shop_id: integer, dismissed: boolean)
2.0.0-p451 :002 > GeneralNotice
NameError: uninitialized constant GeneralNotice
from (irb):2
from /Users/marcoprins/.rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start'
from /Users/marcoprins/.rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
from /Users/marcoprins/.rvm/gems/ruby-2.0.0-p451/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
2.0.0-p451 :003 >
GeneralNoticedoesn't exist, so apparently git is being very nice and helpful by changing the database according to my branchNoticestill has a booleandismissed... Whaaaat???? Is git being nice or not?? HELP!!!!!!