rails_admin 2.0.0.rc → 2.0.0

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: 1b0f4ab7caf68837692964e8e69e90d167282dafa55a35aaaa3d76eb93f97b9d
4
- data.tar.gz: 9a6407f79b492dffafd49568675b7982122c76e080519c0f6b3156abbeb3e71a
3
+ metadata.gz: abb27440720764e68f2c73906b3792c209dbae39f6a54690894e0d1c42983c5f
4
+ data.tar.gz: 2cc7c7588ab9419f9a486f185ea6f345e62c2b2b2e4588e39810f05c5b5a4fdf
5
5
  SHA512:
6
- metadata.gz: 127e444d5dee93ccb6cd28c210368bc143d06732f5683917b0b969eac3717a3a606d5415891d5e768385cc3fd445ce2d754c39f97daec21b50ee49595a5ecde2
7
- data.tar.gz: 14ff533ab2205b78c5d3529bd0b16166af4b2ad54547c6c67d20ffde399ed17defe559dc53c7e34a3c3457ef16bf4de8b4122211c6ea663090946ca84e687380
6
+ metadata.gz: 4518ba5616e66359a663cb1e3978764fa230301eafedcf8fd51bf2257fd31f45ecbca50fd7d5bbcba7196b7b1b03e0822c31afd0183d01bcb842c3d2dd8a9f63
7
+ data.tar.gz: 5e65e91218271a2eb8b7bc5c44cd13769eb7427653382033b3f784442f3ceaf2c5fb739e924bd69b103b3af84f4f390f33de2ef2ec13c8b268c4af49187914fb
data/README.md CHANGED
@@ -16,14 +16,6 @@
16
16
 
17
17
  RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.
18
18
 
19
- ## Announcements
20
-
21
- ### [Action required] Security issue
22
-
23
- > **RailsAdmin prior to 1.3.0 have been reported to have XSS vulnerability.** We strongly recommend that you upgrade RailsAdmin to 1.3.0 or later as soon as possible, if you are on those versions. See [#2985](https://github.com/sferik/rails_admin/issues/2985) for the detail.
24
- >
25
- > Also, 1.0.0 and 1.1.0 is known to have [CSRF vulnerability](https://github.com/sferik/rails_admin/commit/b13e879eb93b661204e9fb5e55f7afa4f397537a), too.
26
-
27
19
  ## Getting started
28
20
 
29
21
  * Check out [the docs][docs].
@@ -50,7 +42,7 @@ RailsAdmin is a Rails engine that provides an easy-to-use interface for managing
50
42
 
51
43
  ## Installation
52
44
 
53
- 1. On your gemfile: `gem 'rails_admin', '~> 2.0.0.rc'`
45
+ 1. On your gemfile: `gem 'rails_admin', '~> 2.0'`
54
46
  2. Run `bundle install`
55
47
  3. Run `rails g rails_admin:install`
56
48
  4. Provide a namespace for the routes when asked
@@ -45,6 +45,7 @@ en:
45
45
  navigation_static_label: "Links"
46
46
  log_out: "Log out"
47
47
  time_ago: "%{time} ago"
48
+ ago: "ago"
48
49
  more: "Plus %{count} more %{models_name}"
49
50
  flash:
50
51
  successful: "%{name} successfully %{action}"
@@ -41,7 +41,7 @@ module RailsAdmin
41
41
  end
42
42
 
43
43
  def primary_key
44
- :_id
44
+ association.primary_key.to_sym rescue :_id
45
45
  end
46
46
 
47
47
  def foreign_key
@@ -49,7 +49,7 @@ module RailsAdmin
49
49
  format.json do
50
50
  output = begin
51
51
  if params[:compact]
52
- primary_key_method = @model_config.abstract_model.primary_key
52
+ primary_key_method = @association ? @association.associated_primary_key : @model_config.abstract_model.primary_key
53
53
  label_method = @model_config.object_label_method
54
54
  @objects.collect { |o| {id: o.send(primary_key_method).to_s, label: o.send(label_method).to_s} }
55
55
  else
@@ -35,6 +35,10 @@ module RailsAdmin
35
35
  true
36
36
  end
37
37
 
38
+ def associated_primary_key
39
+ @associated_primary_key ||= association.primary_key
40
+ end
41
+
38
42
  def selected_id
39
43
  bindings[:object].send(foreign_key)
40
44
  end
@@ -3,7 +3,7 @@ module RailsAdmin
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
5
  PATCH = 0
6
- PRE = 'rc'.freeze
6
+ PRE = nil
7
7
 
8
8
  class << self
9
9
  # @return [String]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Michaels-Ober
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2019-08-04 00:00:00.000000000 Z
15
+ date: 2019-08-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: builder
@@ -609,9 +609,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
609
609
  version: 2.2.2
610
610
  required_rubygems_version: !ruby/object:Gem::Requirement
611
611
  requirements:
612
- - - ">"
612
+ - - ">="
613
613
  - !ruby/object:Gem::Version
614
- version: 1.3.1
614
+ version: 1.8.11
615
615
  requirements: []
616
616
  rubygems_version: 3.0.3
617
617
  signing_key: