In one of my controller methods I need to set a flash[:notice] and
redirect back to the form to show the error.
I have this code:
master_storeids = params[:master_storeid]
if (master_storeids.nil?)
flash[:notice] = 'No store was is selected'
redirect_to :action => 'new_data'
end
followed by the “normal” code that would be proceesed if no error
occurs.
Problem is that the redirect doesn’t seem to do anything it just
continues on to the remaining code.
I have verified that master_storeids is nil and there is a new_data
method in the controller.