standard_view 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5b3fad18e54a169d20a3455742961fd1f2a5271baa992a9a07d6b778e918823
|
4
|
+
data.tar.gz: 3684724e01df8912cbaf462705c477bb20c60fc7f2e6275bee4d5a40c48574d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 387a758ad516068f3c0f5601bc1a113d7c222cf5507c4792cde5d1cfc699114a6e2baea19843588f1ce33ad8e5b91229c6b557584f956b024c14ebaf60af41a5
|
7
|
+
data.tar.gz: 36d00e8cab5f2ebf65066aa0e29bc55e2ce1b131c8b896551209a3d79cf0d4456e3b90858c8c2225f3963db8b075f0a8894fd6f44815eb9de1ca43c9e9372c41
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<li class="breadcrumb-item"><%= link_to parent.breadcrumb_title, parent %></li>
|
13
13
|
|
14
14
|
<% unless on_page?(controller: parent.route_key, action: material.route_key) %>
|
15
|
-
<li class="breadcrumb-item"><%= link_to title_for_model(material), [ material.route_key
|
15
|
+
<li class="breadcrumb-item"><%= link_to title_for_model(material), [ parent, material.route_key ] %></li>
|
16
16
|
<% end %>
|
17
17
|
<% else %>
|
18
18
|
<li class="breadcrumb-item">
|
@@ -1,6 +1,11 @@
|
|
1
1
|
<%# For the good-spirited and impossibly lazy developer, we attempt to jump-start with no code, assuming conventions. %>
|
2
2
|
<% if local_assigns[:material].nil? %>
|
3
|
-
<%
|
3
|
+
<% if local_assigns[:record].nil? %>
|
4
|
+
<% if record_from_parent_route.present? && record_from_parent_route.respond_to?(controller_name) %>
|
5
|
+
<% collection = record_from_parent_route.public_send(controller_name) %>
|
6
|
+
<% end %>
|
7
|
+
<% record = collection.try(:build) || "#{controller_name.singularize.camelize}".constantize.new %>
|
8
|
+
<% end %>
|
4
9
|
<% material = Material::Base.for(record) %>
|
5
10
|
<% end %>
|
6
11
|
|