Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

researching and maybe fixing breadcrumb helper

  • Loading branch information...
commit 0d20288fecd37c11c9de2c06fce665f286279c30 1 parent e8e0e98
Anton Yordanov authored
Showing with 18 additions and 10 deletions.
  1. +18 −10 app/helpers/admin/application_helper.rb
View
28 app/helpers/admin/application_helper.rb
@@ -62,7 +62,9 @@ def breadcrumbs_for_contact(*objects)
if buy.new_record?
t("Нова оферта", :scope => [:admin, :buys], :number => buy.number)
else
- link_to(t("Оферта номер", :scope => [:admin, :buys], :number => buy.number, :kind => buy.offer_type.name), edit_admin_contact_buy_url(contact, buy))
+ link_to(t("Оферта номер", :scope => [:admin, :buys], :number => buy.number, :kind => buy.offer_type.name),
+ edit_admin_contact_buy_url(contact, buy)
+ )
end
end,
"Sell" => lambda do |*args|
@@ -82,9 +84,10 @@ def breadcrumbs_for_contact(*objects)
end,
:search_criteria_index => lambda do |*args|
contact, buys_index, buy, search_criteria_index = args
- link_to(
- t("Списък с критерии", :scope => [:admin, :buys, :search_criteria]),
- admin_contact_buy_search_criterias_url(:buy_id => buy, :contact_id => contact.id)
+ link_to( t("Списък с критерии", :scope => [:admin, :buys, :search_criteria]),
+ admin_contact_buy_search_criterias_url( :buy_id => buy.id.to_s,
+ :contact_id => contact.id
+ )
)
end,
"SearchCriteria" => lambda do |*args|
@@ -92,17 +95,22 @@ def breadcrumbs_for_contact(*objects)
if search_criteria.new_record?
t("Нов критерий", :scope => [:admin, :buys, :search_criteria], :number => buy.number)
else
- link_to(t("Критерий", :scope => [:admin, :buys, :search_criteria]), edit_admin_contact_buy_search_criteria_url(contact, buy, search_criteria))
+ link_to(t("Критерий", :scope => [:admin, :buys, :search_criteria]),
+ edit_admin_contact_buy_search_criteria_url(:contact_id => contact.id,
+ :buy_id => buy.id.to_s,
+ :search_criteria_id => search_criteria.id
+ )
+ )
end
end,
"MatchingSell" => lambda do |*args|
contact, buys_index, buy, search_criteria_index, matching_sell = args
- link_to(
- t("Съвпадащи резултати", :scope => [:admin, :buys, :search_criteria, :search_result]),
- criteria_search_result_admin_contact_buy_search_criteria_path(
- :contact_id => @contact.id, :buy_id => @buy, :id => matching_sell.presentation_object
- )
+ link_to( t("Съвпадащи резултати", :scope => [:admin, :buys, :search_criteria, :search_result]),
+ criteria_search_result_admin_contact_buy_search_criteria_path( :contact_id => @contact.id,
+ :buy_id => @buy.id.to_s,
+ :id => matching_sell.presentation_object
+ )
)
end,
}
Please sign in to comment.
Something went wrong with that request. Please try again.