def action_link(scope, link_data)
      value = nil
      case link_data

      when Proc
        value = link_data.call(scope)

      when Hash
        relation = link_data.keys.first
        entity = Fields::Reader.field_value(scope, relation)
        unless entity.present?
          return ''
        end
        if link_data[relation][:label_field].present?
          value = field_value(scope, link_data[relation][:label_field])
        elsif link_data[relation][:label].present?
          value = link_data[relation][:label]
        end

        path = entity.class.name.dasherize.pluralize.downcase
        return  link_to value, [scope.public_send(relation)]

      when *[Symbol, String]
        relation = link_data.to_s
        assocation = scope.class.reflect_on_association(link_data.to_sym)
        raise "assocation #{link_data} not found on #{scope.class}" unless assocation
        if assocation.options[:class_name].present?
          rel_name = scope.class.reflect_on_association(link_data.to_sym).options[:class_name]
          relation = rel_name.downcase.dasherize.pluralize
        end
        if scope.class.reflect_on_association(link_data.to_sym).options[:as].present?
          key = scope.class.reflect_on_association(link_data.to_sym).options[:as].to_s + '_id'
        else
          key = scope.class.name.downcase.dasherize + '_id'
        end
        return "<a href=\"#{relation}?f%5B#{key}%5D=#{scope.id}\">#{resource_class.human_attribute_name(link_data.to_s)}</a>".html_safe
      else
        raise 'Unsupported link data'
      end

    end
def action_link(scope, link_data)
      value = nil
      case link_data

      when Proc
        value = link_data.call(scope)

      when Hash
        relation = link_data.keys.first
        entity = Fields::Reader.field_value(scope, relation)
        unless entity.present?
          return ''
        end
        if link_data[relation][:label_field].present?
          value = field_value(scope, link_data[relation][:label_field])
        elsif link_data[relation][:label].present?
          value = link_data[relation][:label]
        end

        path = entity.class.name.dasherize.pluralize.downcase
        return  link_to value, [scope.public_send(relation)]

      when *[Symbol, String]
        relation = link_data.to_s
        assocation = scope.class.reflect_on_association(link_data.to_sym)
        raise "assocation #{link_data} not found on #{scope.class}" unless assocation
        if assocation.options[:class_name].present?
          rel_name = scope.class.reflect_on_association(link_data.to_sym).options[:class_name]
          relation = rel_name.downcase.dasherize.pluralize
        end
        if scope.class.reflect_on_association(link_data.to_sym).options[:as].present?
          key = scope.class.reflect_on_association(link_data.to_sym).options[:as].to_s + '_id'
        else
          key = scope.class.name.downcase.dasherize + '_id'
        end
        return "<a href=\"#{relation}?f%5B#{key}%5D=#{scope.id}\">#{resource_class.human_attribute_name(link_data.to_s)}</a>".html_safe
      else
        raise 'Unsupported link data'
      end

    end
to customise the actions for a resource define a list of actions

 example:
   action_links  :posts, :tickets, ->(resource) {link_to "#{resource.name}"}

 @param  scope [type] [description]
 @param  link_data [type] [description]

 @return [type] [description]