public Method

Base.reload

A method to reload the attributes of this object from the remote web service.

Examples

my_branch = Branch.find(:first)
my_branch.name
# => Wislon Raod

# Another client fixes the typo...

my_branch.name
# => Wislon Raod
my_branch.reload
my_branch.name
# => Wilson Road

Source Code

# File active_resource/base.rb, line 739
def reload
  self.load(self.class.find(id, :params => @prefix_options).attributes)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.