Hi Sergio,

I have a custom controller action to clone a record. And have an action 
link on the records to initiate the clone.

Cloning works fine.. but I don't need a view template for this action.

The action will be taken from the list view.

What is the redirect/render command I need so I need in the "clone" 
controller method to either

   1. re-render / refresh the list view to include the cloned item
   2. Show the cloned item with the AS show action
   3. Edit the cloned item with the AS edit action

conf.action_links.add :clone_record, :type => :member, :method => :post, 
security_method: :create_authorized?,  :confirm => "Clone Record"

def clone_record
    record = SomeModel.find(params[:id])
    cloned_record = record.clone_me

    flash[:info] = as_("Record Cloned ...#{cloned_record.id}")
    list
  end

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/activescaffold/99ee295f-ac6e-4246-ab31-1d9416a188fan%40googlegroups.com.

Reply via email to