Displaying 1 result from an estimated 1 matches for "do_revert".
Did you mean:
  do_reject
  
2005 Dec 27
4
acts_as_versioned
...zed CMS rails application to set up revision control for pages.
Getting and viewing versions works allright, but when I try to revert
to a version in the following way, nothing happens to the actual data
in the object.
Link from page:
<%= link_to image_tag('revert'), :action => 'do_revert', :id => @page,
:version => version %>
in my controller:
  def do_revert
    page = Page.find(params[:id])
    page.revert_to!(params[:version])
    flash[:notice] = page.title
    redirect_to :action => 'edit', :id => params[:id]
  end
When I look at the data in the o...