I have an action like

def create
    if params[:ticket][:title].empty?
      flash[:notice] = 'Please fill fields marked with *'
      redirect_to :action => 'create_ticket_ui'
    else
  @contact_id =
ContactEmailAddress.get_contact_id(params[:contact_email][:email])
      begin
        ActiveRecord::Base.transaction do
        #Now create a new sd ticket
         ServiceDesk.create_ticket(@contact_id,params[:ticket])
        end #transaction end
      end #begin end
       rescue   #here is the problem
    end #outer if else end
  end

     My problem is when I start typing rescue as above IDE shows Syntax
error.Could you please help me to solve this? What I tried is to get the
error in transaction rescued Already inside the model also I have placed
the code in transaction begin end block and re raised any exception from
there

Thanks in advance
Sijo
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to