我一直在尝试让我的面包屑为我提供返回父视图的正确 url 路径。我在我的控制器中尝试了许多不同的变体,但他们都不想给我 url 路径中的 objects 变量
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/#{@amusement_park_id}/amusement_park_rules/#{@amusement_park_rule_id}/roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/" + @amusement_park_id + "/amusement_park_rules/" + @amusement_park_rule_id + "roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/" + amusement_park_id + "/amusement_park_rules/" + amusement_park_rule_id + "roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/#{@amusement_park.id}/amusement_park_rules/#{@amusement_park_rule.id}/roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/" + @amusement_park.id + "/amusement_park_rules/" + @amusement_park_rule.id + "roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/" + amusement_park.id + "/amusement_park_rules/" + amusement_park_rule.id + "roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/#{:amusement_park_id}/amusement_park_rules/#{:amusement_park_rule_id}/roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", "/amusement_parks/" + :amusement_park_id + "/amusement_park_rules/" + :amusement_park_rule_id + "roller_coaster_rules"
add_breadcrumb "Roller Coaster Rules", amusement_parks_amusement_park_id_amusement_park_rules_amusement_park_rule_id_roller_coaster_rules_path
add_breadcrumb "Roller Coaster Rules", amusement_parks_amusement_park_rules_roller_coaster_rules_path
我试图获得类似于 [http://localhost:3000/amusement_parks/5/amusement_park_rules/1/roller_coaster_rules/] 的面包屑链接的最终结果
我到底在想什么?
Ruby 1.8.7、Rails 3.2.12、Debian 5、Twitter Bootstrap,在 Oracle VM 上运行