Hi Segio

Tasks Controller

 conf.action_links.add 'clone', :label => 'Clone', :page => false, :type => 
:member
Nb. This displays corretly on per record basis

def clone
 old_task = Task.find(params[:id])
 new_task = old_task.dup
 new_task.save
end

Routes.rb
  resources :tasks, concerns: :active_scaffold 
resources :tasks do
    member do
     get 'clone' =>"tasks#clone"
    end
    as_routes
  end

Issue: When I click clone... something is happening but the duplicate 
record is not being save or perhaps not duplicated at all

BTW, I got the idea 
from 
http://stackoverflow.com/questions/60033/what-is-the-easiest-way-to-duplicate-an-activerecord-record

Q. What have I done wrong ?
 

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to