easy-admin-rails 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11d174ad1120c7858eaed0b32696df342af87924472fc41539c40f75514105f8
4
- data.tar.gz: 2da63e52f4cf26c90a45ee6a26f57ab986c386451abe5ae7bd24f69614f3193d
3
+ metadata.gz: 3e4ac8d05fd7b8b98a9b0dbaf91dac4adbe81d74c9810fea9e33109d37ef0cdc
4
+ data.tar.gz: fb32068394c78d4fe2a0cd937c3a5e7b3c0db314d38f06125408ed4a3e86394d
5
5
  SHA512:
6
- metadata.gz: 4589758bd7cbe06de20c4c740796913b8132ddbab8576a82a6eff872af3b0f5059a83a17754a8c2beed52bdd057b861b34cf6b3e2b526f77d3590cf819c392d8
7
- data.tar.gz: 6be0bc4f4627e94af8a11125990cf9550b6245a14693de3053811d82474c196970b526a64f59f706d2f5e646d530506f6a0d3bb5dcee3652261f46900a06265d
6
+ metadata.gz: 250cb7801b3400c293670f50e075391e4b67a7c65a3f34d50d5fe0e0c43b218ac19d81bedf74914f2165082f44c0189ef35e5727056181d81a9372d391ceb627
7
+ data.tar.gz: 1fd7d7480949532bdbb683e7f1f2ca9539d0ea399d421471a812e629e4af7c2ace5f111d5783a3df72d0541bad5fa543a771ffb73ca8b50a79eda71746a6db3a
@@ -136,7 +136,8 @@ module EasyAdmin
136
136
  def resource
137
137
  # Find resource by model class name
138
138
  model_name = @record.class.name
139
- route_key = "#{model_name.downcase.pluralize}"
139
+ # Convert model name to route key format (e.g., "Catalog::PaymentMethod" -> "payment_methods")
140
+ route_key = model_name.demodulize.underscore.pluralize
140
141
  EasyAdmin::ResourceRegistry.find_resource(route_key)
141
142
  end
142
143
  end
@@ -49,19 +49,6 @@ module EasyAdmin
49
49
  SVG
50
50
  h3(class: "mt-2 text-sm font-semibold text-gray-900") { "No #{@resource_class.title.downcase}" }
51
51
  p(class: "mt-1 text-sm text-gray-500") { "Get started by creating a new #{@resource_class.singular_title.downcase}." }
52
- div(class: "mt-6") do
53
- a(
54
- href: easy_admin_url_helpers.new_resource_path(@resource_class.route_key),
55
- class: "inline-flex items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
56
- ) do
57
- unsafe_raw <<~SVG
58
- <svg class="-ml-0.5 mr-1.5 h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
59
- <path d="M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"/>
60
- </svg>
61
- SVG
62
- "New #{@resource_class.singular_title}"
63
- end
64
- end
65
52
  end
66
53
  end
67
54
 
@@ -85,4 +72,4 @@ module EasyAdmin
85
72
  end
86
73
  end
87
74
  end
88
- end
75
+ end
@@ -1,3 +1,3 @@
1
1
  module EasyAdmin
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-admin-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slaurmagan