4

I got fk parent/child row deletion/update errors while performing deletion on parent row.So I removed related child records from database manually. But still i am getting errors. I presume it is related to cache. One more thing i must mention here is that when i see child records, it shows me updated state of table i.e. deleted records are not visible(that may be because i fired that query first time).

Maddy.Shik
  • 6,609
  • 18
  • 69
  • 98

3 Answers3

7

Yeah whenever you make any changes to the database or for that matter even code, it wont reflect in the console, you need to do reload! e.g

ree-1.8.7-2010.02 > reload!
Reloading...
 => true 
ree-1.8.7-2010.02 > 
Shiv
  • 8,362
  • 5
  • 29
  • 32
4

Add config.action_controller.perform_caching = false

in environment/*.rb

Maddy.Shik
  • 6,609
  • 18
  • 69
  • 98
2

You can run the command:

reload!

which should reload your models(along with various other things).

as seen here.

Mike Lewis
  • 63,433
  • 20
  • 141
  • 111
  • As seen in the link above, it "reloads the environment". Which includes code that changes, or code that doesn't. – Mike Lewis Mar 24 '11 at 00:13