Sha256: 7a301938a4c6905c33eba3b495b63f04504912f21ce9d756898636a6c4a6a7e3
Contents?: true
Size: 817 Bytes
Versions: 138
Compression:
Stored size: 817 Bytes
Contents
module Avo module Services class PanelService attr_accessor :request attr_accessor :params attr_accessor :resource def initialize(request: nil, resource: nil) @request = request @params = request.params end def default_panel_name return @request[:via_relation_param].capitalize if @request[:via_relation_param] == "has_one" case @view when :show I18n.t("avo.resource_details", item: @resource.name.downcase, title: @resource.model_title).upcase_first when :edit I18n.t("avo.update_item", item: @resource.name.downcase, title: @resource.model_title).upcase_first when :new I18n.t("avo.create_new_item", item: @resource.name.downcase).upcase_first end end end end end
Version data entries
138 entries across 138 versions & 1 rubygems