Activerecord validation error after a redirect_to

Hi
I have a respond_to block as below
respond_to do |format|
if @service_desk_resolution.save
format.js{render :action => “sd_resolution_save.rjs”}
format.html {redirect_to(:action => ‘show_details’, :id =>
params[:id],:activeTab => 1) }
else
format.js { render :action => ‘sd_resolution_save_errors.rjs’ }
format.html {redirect_to :action => ‘define_sd_resolution_ui’,:id =>
params[:id],:sd_resolution_id=>params[:sd_resolution_id],:page=>‘search_sd_ticket’}
end

and

def define_sd_resolution_ui
@sd_ticket_id=params[:id]
@sd_resolution_id=params[:sd_resolution]
@sd_ticket=ServiceDeskTicket.find(params[:id])
@[email protected]_ticket.service_desk_resolution
#The following line is used to make sure days,hours,minutes get
default value zero
@sd_resol = ServiceDeskResolutionEffort.new()
@sd_resol.showdata(“00:00”)
if(!@sd_resolution.nil?)
if(!@sd_resolution.effort.nil?)
@sd_resol = ServiceDeskResolutionEffort.new()
@sd_resol.showdata(@sd_resolution.effort)
end
end
end

My problem is in the above else case after redirect to
define_sd_resolution_ui my active record validation does not show the
error message as expected.which i gave in define_sd_resolution_ui.rhtml
as <%= error_messages_for ‘service_desk_resolution’ %> Why this happens?

Sijo

I solved it

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs