app/helpers/tramway/admin/actions_helper.rb in tramway-admin-1.28.2.1 vs app/helpers/tramway/admin/actions_helper.rb in tramway-admin-1.29

- old
+ new

@@ -9,9 +9,25 @@ role: current_user.role, action: :destroy ) end + def update_is_available?(association_object, _main_object) + ::Tramway::Admin.action_is_available?( + association_object, + project: (@application_engine || @application.name), + model_name: association_object.model.class.name, + role: current_user.role, + action: :update + ) + end + + # delete_button is in smart-buttons gem + + def edit_button(url:, button_options:, &block) + link_to(url, **button_options) { yield } + end + def habtm_destroy_is_available?(association_object, main_object) ::Tramway::Admin.forms&.include?("#{main_object.model.class.to_s.underscore.pluralize}/remove_#{association_object.model.class.to_s.underscore}") end end