Connecting Tech Pros Worldwide Help | Site Map

New to Ruby/Rails

Newbie
 
Join Date: Aug 2007
Posts: 1
#1: Aug 16 '07
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:

Expand|Select|Wrap|Line Numbers
  1. class test < ActiveRecord::Base
  2. before_destroy :change_field
  3.  
  4.    def change_field      
  5.       self.filed='0'
  6.       update
  7.       test.reload()
  8.  
  9.       #page.call 'location.reload'       
  10.       return false     
  11.     end
  12.  
It doesnt work... so my question is... is there an easy way to force a refresh of the screen?

Thanks
Reply