app/views/administrate/application/index.html.erb in administrate-0.8.1 vs app/views/administrate/application/index.html.erb in administrate-0.9.0
- old
+ new
@@ -40,13 +40,16 @@
) %>
<% end %>
<div>
<%= link_to(
- "#{t("administrate.actions.new")} #{page.resource_name.titleize.downcase}",
+ t(
+ "administrate.actions.new_resource",
+ name: page.resource_name.titleize.downcase
+ ),
[:new, namespace, page.resource_path],
class: "button",
- ) if valid_action? :new %>
+ ) if valid_action?(:new) && show_action?(:new, new_resource) %>
</div>
</header>
<section class="main-content__body main-content__body--flush">
<%= render(