How to implement automatic reflection of direct SQL Updates of the underlying database, in an ActiveRecord in Ruby on Rails ?
- by Vadim Eisenberg
Hello ! I am new to Ruby on Rails and I have a (maybe naive) question:
I want to implement reflection of direct SQL Updates of the underlying database in an ActiveRecord (and finally in the generated html). By "direct updates" I mean updating the database bypassing the ActiveRecord methods, for example by MySQL console. I guess here MySQL triggers could be used that would call some stored procedure that would cause the appropriate ActiveRecord to be reloaded.
Is there some automatic handling of this scenario in ActiveRecord/Ruby on Rails ? Did somebody implement this scenario ? Can somebody recommend using other MVC frameworks to reflect direct changes in mapped databases ?