lib/alchemy/resources_helper.rb in alchemy_cms-7.3.0 vs lib/alchemy/resources_helper.rb in alchemy_cms-7.3.1

- old
+ new

@@ -128,18 +128,19 @@ end # Returns the attribute's column for sorting # # If the attribute contains a resource_relation, then the table and column for related model will be returned. - # + # @deprecated def sortable_resource_header_column(attribute) if (relation = attribute[:relation]) "#{relation[:model_association].name}_#{relation[:attr_method]}" else attribute[:name] end end + deprecate sortable_resource_header_column: "Please `render Alchemy::Admin::Resource::Table instead`", deprecator: Alchemy::Deprecation # Renders the row for a resource record in the resources table. # # This helper has a nice fallback. If you create a partial for your record then this partial will be rendered. # @@ -154,15 +155,16 @@ # <td><%= comment.title %></td> # <td><%= comment.body %></td> # </tr> # # NOTE: Alchemy gives you a local variable named like your resource - # + # @deprecated def render_resources(icon: nil) render partial: resource_name, collection: resources_instance_variable, locals: {icon: icon} rescue ActionView::MissingTemplate render partial: "resource", collection: resources_instance_variable, locals: {icon: icon} end + deprecate render_resources: "Please `render Alchemy::Admin::Resource::Table instead`", deprecator: Alchemy::Deprecation def resource_has_tags resource_model.respond_to?(:tag_counts) && resource_model.tag_counts.any? end end