How to implement automatic reflection of direct SQL Updates of the underlying database, in an ActiveRecord in Ruby on Rails ?

Posted by Vadim Eisenberg on Stack Overflow See other posts from Stack Overflow or by Vadim Eisenberg
Published on 2010-12-25T07:40:03Z Indexed on 2010/12/25 7:54 UTC
Read the original article Hit count: 195

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 ?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about orm