I have to get the row id after submission of a form.
My model is Boxelement.rb
def create
if @boxelement.save
puts params[:boxelement]
end
end
Output is:
{"name"=>"fwqfew", "project_id"=>"1", "author_id"=>"1", "private_flag"=>"0"}
But I need to know the id of the newly created row. How can I get it?