New to Ruby/Rails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ccraig
    New Member
    • Aug 2007
    • 1

    New to Ruby/Rails

    Hello, I am new to this and have run into a problem. I have edited a column in MySql and I can see that it works fine. The problem I have is I need to refresh the view (hope thats the right term) to show the change. I have looked and come up with:

    Code:
    class test < ActiveRecord::Base
    before_destroy :change_field
    
       def change_field      
          self.filed='0'
          update
          test.reload()
          
          #page.call 'location.reload'       
          return false     
        end
    It doesnt work... so my question is... is there an easy way to force a refresh of the screen?

    Thanks
Working...