Project

General

Profile

« Previous | Next » 

Revision a005b7dc

Added by Kavita Gaikwad over 7 years ago

Fixes #12649 - Index search not retained on cancel click

On pages puppet classes and host group, index search is not
retained on form's cancel click.
Added cancel_path_with_index_search method
in file application_helper.rb

View differences:

app/helpers/application_helper.rb
sub_model.map {|model| link_to(model.to_label, { :controller => model.class.model_name.plural.downcase, :action => :index, :search => "name = \"#{model.name}\"" })}.to_sentence
end
def cancel_path_with_index_search
prev_controller_url = session["redirect_to_url_#{controller_name}"].to_s
return nil unless prev_controller_url.include?('search')
prev_controller_url
end
private
def edit_inline(object, property, options = {})

Also available in: Unified diff