mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-19 06:15:44 -04:00
Only render an edit control if the permission exists
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
%b Crop:
|
||||
= link_to @scientific_name.crop, @scientific_name.crop
|
||||
|
||||
= link_to 'Edit', edit_scientific_name_path(@scientific_name), :class => 'btn btn-default btn-xs'
|
||||
\|
|
||||
|
||||
- if can? :edit, @scientific_name
|
||||
= link_to 'Edit', edit_scientific_name_path(@scientific_name), :class => 'btn btn-default btn-xs'
|
||||
\|
|
||||
= link_to 'Back', scientific_names_path
|
||||
|
||||
Reference in New Issue
Block a user