activeadmin 1.0.0.pre5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activeadmin might be problematic. Click here for more details.

Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +27 -0
  3. data/.travis.yml +21 -23
  4. data/Appraisals +12 -74
  5. data/CHANGELOG.md +21 -5
  6. data/CONTRIBUTING.md +2 -2
  7. data/Gemfile +8 -9
  8. data/README.md +19 -56
  9. data/Rakefile +1 -1
  10. data/activeadmin.gemspec +4 -4
  11. data/app/assets/stylesheets/active_admin/_forms.scss +10 -0
  12. data/config/locales/ca.yml +1 -1
  13. data/config/locales/da.yml +44 -12
  14. data/config/locales/el.yml +1 -1
  15. data/config/locales/en.yml +2 -0
  16. data/config/locales/fr.yml +16 -2
  17. data/config/locales/ja.yml +1 -0
  18. data/config/locales/zh-CN.yml +4 -0
  19. data/docs/12-arbre-components.md +23 -0
  20. data/docs/14-gotchas.md +1 -1
  21. data/docs/2-resource-customization.md +2 -5
  22. data/docs/5-forms.md +19 -0
  23. data/docs/6-show-pages.md +0 -28
  24. data/docs/9-batch-actions.md +0 -1
  25. data/docs/CNAME +1 -1
  26. data/docs/_includes/head.html +4 -4
  27. data/docs/_includes/toc.html +2 -1
  28. data/docs/documentation.md +2 -2
  29. data/docs/index.html +1 -6
  30. data/docs/stylesheets/main.css +172 -219
  31. data/features/belongs_to.feature +5 -5
  32. data/features/comments/commenting.feature +0 -13
  33. data/features/create_another.feature +55 -0
  34. data/features/development_reloading.feature +2 -4
  35. data/features/edit_page.feature +6 -7
  36. data/features/favicon.feature +2 -2
  37. data/features/i18n.feature +1 -0
  38. data/features/index/filters.feature +18 -0
  39. data/features/index/format_as_csv.feature +3 -3
  40. data/features/index/formats.feature +22 -0
  41. data/features/index/index_as_table.feature +6 -6
  42. data/features/index/page_title.feature +1 -2
  43. data/features/menu.feature +20 -1
  44. data/features/new_page.feature +6 -8
  45. data/features/registering_assets.feature +4 -4
  46. data/features/registering_pages.feature +18 -0
  47. data/features/renamed_resource.feature +2 -4
  48. data/features/show/page_title.feature +1 -2
  49. data/features/step_definitions/attribute_steps.rb +1 -1
  50. data/features/step_definitions/configuration_steps.rb +2 -2
  51. data/features/step_definitions/format_steps.rb +4 -0
  52. data/features/step_definitions/index_scope_steps.rb +1 -1
  53. data/features/step_definitions/menu_steps.rb +2 -2
  54. data/features/step_definitions/user_steps.rb +1 -1
  55. data/features/step_definitions/web_steps.rb +6 -5
  56. data/features/sti_resource.feature +2 -2
  57. data/features/strong_parameters.feature +0 -4
  58. data/features/support/env.rb +5 -19
  59. data/features/support/paths.rb +6 -9
  60. data/gemfiles/rails_42.gemfile +15 -23
  61. data/gemfiles/rails_50.gemfile +15 -16
  62. data/gemfiles/rails_51.gemfile +45 -0
  63. data/lib/active_admin/application.rb +4 -0
  64. data/lib/active_admin/base_controller.rb +2 -7
  65. data/lib/active_admin/base_controller/menu.rb +1 -5
  66. data/lib/active_admin/csv_builder.rb +2 -2
  67. data/lib/active_admin/dependency.rb +4 -8
  68. data/lib/active_admin/devise.rb +1 -1
  69. data/lib/active_admin/error.rb +1 -1
  70. data/lib/active_admin/filters/active.rb +2 -10
  71. data/lib/active_admin/filters/resource_extension.rb +1 -10
  72. data/lib/active_admin/inputs/filters/date_range_input.rb +1 -1
  73. data/lib/active_admin/inputs/filters/select_input.rb +1 -2
  74. data/lib/active_admin/inputs/filters/text_input.rb +2 -2
  75. data/lib/active_admin/menu.rb +1 -1
  76. data/lib/active_admin/namespace.rb +14 -7
  77. data/lib/active_admin/orm/active_record/comments.rb +2 -7
  78. data/lib/active_admin/orm/active_record/comments/comment.rb +2 -12
  79. data/lib/active_admin/page.rb +5 -0
  80. data/lib/active_admin/page_controller.rb +1 -5
  81. data/lib/active_admin/resource.rb +28 -5
  82. data/lib/active_admin/resource/attributes.rb +44 -0
  83. data/lib/active_admin/resource/menu.rb +4 -1
  84. data/lib/active_admin/resource/routes.rb +2 -3
  85. data/lib/active_admin/resource_controller.rb +13 -0
  86. data/lib/active_admin/resource_controller/data_access.rb +18 -9
  87. data/lib/active_admin/resource_dsl.rb +21 -18
  88. data/lib/active_admin/version.rb +1 -1
  89. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +1 -1
  90. data/lib/active_admin/view_helpers/display_helper.rb +10 -12
  91. data/lib/active_admin/view_helpers/download_format_links_helper.rb +12 -0
  92. data/lib/active_admin/view_helpers/fields_for.rb +1 -2
  93. data/lib/active_admin/view_helpers/form_helper.rb +1 -1
  94. data/lib/active_admin/views/components/active_admin_form.rb +28 -2
  95. data/lib/active_admin/views/components/paginated_collection.rb +3 -8
  96. data/lib/active_admin/views/components/table_for.rb +1 -1
  97. data/lib/active_admin/views/index_as_table.rb +2 -2
  98. data/lib/active_admin/views/pages/layout.rb +1 -1
  99. data/lib/active_admin/views/pages/show.rb +1 -1
  100. data/lib/bug_report_templates/rails_5_master.rb +1 -3
  101. data/lib/generators/active_admin/devise/devise_generator.rb +1 -1
  102. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +7 -0
  103. data/lib/generators/active_admin/install/templates/admin_user.rb.erb +0 -2
  104. data/lib/generators/active_admin/install/templates/migrations/create_active_admin_comments.rb.erb +5 -7
  105. data/lib/generators/active_admin/resource/resource_generator.rb +1 -1
  106. data/lib/generators/active_admin/resource/templates/{admin.rb → admin.rb.erb} +0 -2
  107. data/lib/ransack_ext.rb +2 -2
  108. data/spec/rails_helper.rb +1 -19
  109. data/spec/requests/default_namespace_spec.rb +40 -8
  110. data/spec/support/active_admin_integration_spec_helper.rb +9 -2
  111. data/spec/support/rails_template.rb +17 -20
  112. data/spec/support/rails_template_with_data.rb +3 -9
  113. data/spec/support/templates/admin/stores.rb +1 -3
  114. data/spec/unit/application_spec.rb +19 -8
  115. data/spec/unit/belongs_to_spec.rb +6 -2
  116. data/spec/unit/comments_spec.rb +0 -19
  117. data/spec/unit/controller_filters_spec.rb +5 -5
  118. data/spec/unit/csv_builder_spec.rb +7 -4
  119. data/spec/unit/filters/active_spec.rb +1 -8
  120. data/spec/unit/filters/filter_form_builder_spec.rb +2 -3
  121. data/spec/unit/filters/resource_spec.rb +3 -4
  122. data/spec/unit/form_builder_spec.rb +39 -11
  123. data/spec/unit/namespace/register_page_spec.rb +1 -1
  124. data/spec/unit/pretty_format_spec.rb +39 -35
  125. data/spec/unit/resource/attributes_spec.rb +50 -0
  126. data/spec/unit/resource/includes_spec.rb +1 -1
  127. data/spec/unit/resource/ordering_spec.rb +1 -1
  128. data/spec/unit/resource/routes_spec.rb +2 -2
  129. data/spec/unit/resource_controller/data_access_spec.rb +51 -10
  130. data/spec/unit/resource_controller/decorators_spec.rb +2 -2
  131. data/spec/unit/resource_controller/sidebars_spec.rb +3 -3
  132. data/spec/unit/resource_controller_spec.rb +16 -5
  133. data/spec/unit/resource_spec.rb +12 -38
  134. data/spec/unit/routing_spec.rb +2 -2
  135. data/spec/unit/view_helpers/breadcrumbs_spec.rb +36 -1
  136. data/spec/unit/view_helpers/display_helper_spec.rb +17 -2
  137. data/spec/unit/view_helpers/fields_for_spec.rb +1 -1
  138. data/spec/unit/view_helpers/form_helper_spec.rb +3 -3
  139. data/spec/unit/view_helpers/method_or_proc_helper_spec.rb +2 -2
  140. data/spec/unit/views/components/attributes_table_spec.rb +2 -2
  141. data/spec/unit/views/components/index_list_spec.rb +1 -1
  142. data/spec/unit/views/components/paginated_collection_spec.rb +4 -4
  143. data/spec/unit/views/components/table_for_spec.rb +1 -1
  144. data/spec/unit/views/components/unsupported_browser_spec.rb +1 -1
  145. data/spec/unit/views/pages/form_spec.rb +4 -1
  146. data/spec/unit/views/pages/index_spec.rb +1 -1
  147. data/spec/unit/views/pages/show_spec.rb +2 -3
  148. data/tasks/lint.rake +8 -0
  149. metadata +22 -29
  150. data/features/step_definitions/symbol_leak_steps.rb +0 -3
  151. data/features/symbol_leak.feature +0 -35
  152. data/gemfiles/rails_32.gemfile +0 -54
  153. data/gemfiles/rails_40.gemfile +0 -53
  154. data/gemfiles/rails_41.gemfile +0 -53
  155. data/spec/support/deferred_garbage_collection.rb +0 -19
data/Rakefile CHANGED
@@ -45,7 +45,7 @@ end
45
45
  # Import all our rake tasks
46
46
  FileList['tasks/**/*.rake'].each { |task| import task }
47
47
 
48
- task default: :test
48
+ task default: [:test, :lint]
49
49
 
50
50
  begin
51
51
  require 'jasmine'
@@ -16,18 +16,18 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
18
18
 
19
- s.required_ruby_version = '>= 1.9.3'
19
+ s.required_ruby_version = '>= 2.1'
20
20
 
21
- s.add_dependency 'arbre', '~> 1.0', '>= 1.0.2'
21
+ s.add_dependency 'arbre', '>= 1.1.1'
22
22
  s.add_dependency 'bourbon'
23
23
  s.add_dependency 'coffee-rails'
24
24
  s.add_dependency 'formtastic', '~> 3.1'
25
25
  s.add_dependency 'formtastic_i18n'
26
- s.add_dependency 'inherited_resources', '~> 1.6'
26
+ s.add_dependency 'inherited_resources', '~> 1.7'
27
27
  s.add_dependency 'jquery-rails'
28
28
  s.add_dependency 'jquery-ui-rails'
29
29
  s.add_dependency 'kaminari', '>= 0.15', '< 2.0'
30
- s.add_dependency 'railties', '>= 3.2', '< 5.1'
30
+ s.add_dependency 'railties', '>= 4.2', '< 5.2'
31
31
  s.add_dependency 'ransack', '~> 1.3'
32
32
  s.add_dependency 'sass-rails'
33
33
  s.add_dependency 'sprockets', '< 4.1'
@@ -242,6 +242,16 @@ form {
242
242
  input[type=submit], input[type=button], button { margin-right: 10px; }
243
243
  }
244
244
 
245
+ .buttons .actions .create_another {
246
+ float: none;
247
+ margin-bottom: 10px;
248
+
249
+ label {
250
+ float: none;
251
+ display: inline;
252
+ }
253
+ }
254
+
245
255
  fieldset.buttons li, fieldset.actions li {
246
256
  float:left;
247
257
  padding: 0;
@@ -11,7 +11,7 @@ ca:
11
11
  delete_confirmation: "Segur que vols eliminar-ho?"
12
12
  new_model: "Crear %{model}"
13
13
  edit_model: "Editar %{model}"
14
- delete_model: "eliminar %{model}"
14
+ delete_model: "Eliminar %{model}"
15
15
  details: "Detalls de %{model}"
16
16
  cancel: "Cancel·lar"
17
17
  empty: "Buit"
@@ -7,7 +7,8 @@ da:
7
7
  view: "Vis"
8
8
  edit: "Rediger"
9
9
  delete: "Slet"
10
- delete_confirmation: "Er du sikker at du ønsker at slette?"
10
+ delete_confirmation: "Er du sikker på, at du ønsker at slette?"
11
+ create_another: "Opret endnu en %{model}"
11
12
  new_model: "Ny(t) %{model}"
12
13
  edit_model: "Rediger %{model}"
13
14
  delete_model: "Slet %{model}"
@@ -26,11 +27,16 @@ da:
26
27
  clear: "Ryd filtre"
27
28
  predicates:
28
29
  contains: "Indeholder"
29
- equals: "lig"
30
+ equals: "Lig"
30
31
  starts_with: "Begynder med"
31
32
  ends_with: "Slutter med"
32
- greater_than: "større end"
33
- less_than: "mindre end"
33
+ greater_than: "Større end"
34
+ less_than: "Mindre end"
35
+ search_status:
36
+ headline: "Søgestatus:"
37
+ current_scope: "Perspektiv:"
38
+ current_filters: "Valgte filtre:"
39
+ no_current_filters: "Ingen"
34
40
  status_tag:
35
41
  "yes": "Ja"
36
42
  "no": "Nej"
@@ -39,12 +45,14 @@ da:
39
45
  powered_by: "Powered by %{active_admin} %{version}"
40
46
  sidebars:
41
47
  filters: "Filtre"
48
+ search_status: "Søgestatus"
42
49
  pagination:
43
50
  empty: "Ingen %{model} fundet"
44
51
  one: "Viser <b>1</b> %{model}"
45
52
  one_page: "Viser <b>alle %{n}</b> %{model}"
46
53
  multiple: "Viser %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> af <b>%{total}</b> i alt"
47
54
  multiple_without_total: "Viser %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
55
+ per_page: "Per side: "
48
56
  entry:
49
57
  one: "post"
50
58
  other: "poster"
@@ -61,24 +69,39 @@ da:
61
69
  succesfully_destroyed:
62
70
  one: "Vellykket ødelagt 1 %{model}"
63
71
  other: "Vellykket ødelagt %{count} %{plural_model}"
64
- selection_toggle_explanation: "(Skift Selection)"
72
+ selection_toggle_explanation: "(Skift valg)"
65
73
  link: "Opret en"
66
74
  action_label: "%{title} Valgte"
67
75
  labels:
68
76
  destroy: "Slet"
69
77
  comments:
70
- resource_type: "resource type"
71
- author_type: "forfatter type"
72
- body: "krop"
73
- author: "forfatter"
78
+ created_at: "Oprettet"
79
+ resource_type: "Resource type"
80
+ author_type: "Forfatter type"
81
+ body: "Krop"
82
+ author: "Forfatter"
74
83
  title: "Kommentar"
75
84
  add: "Tilføj Kommentar"
85
+ delete: "Slet kommentar"
86
+ delete_confirmation: "Er du sikker på du vil slette disse kommentarer?"
76
87
  resource: "Resource"
77
88
  no_comments_yet: "Ingen kommentarer endnu."
89
+ author_missing: "Anonym"
78
90
  title_content: "Kommentarer (%{count})"
79
91
  errors:
80
92
  empty_text: "Kommentar blev ikke gemt, tekst var tom."
81
93
  devise:
94
+ username:
95
+ title: "Brugernavn"
96
+ email:
97
+ title: "Email"
98
+ subdomain:
99
+ title: "Underdomæne"
100
+ password:
101
+ title: "Kodeord"
102
+ sign_up:
103
+ title: "Opret bruger"
104
+ submit: "Opret bruger"
82
105
  login:
83
106
  title: "Login"
84
107
  remember_me: "Husk mig"
@@ -90,12 +113,22 @@ da:
90
113
  title: "Skift din adgangskode"
91
114
  submit: "Skift min adgangskode"
92
115
  unlock:
93
- title: "Send oplåsnings instruktioner igen"
94
- submit: "Send oplåsnings instruktioner igen"
116
+ title: "Send oplåsningsinstruktioner igen"
117
+ submit: "Send oplåsningsinstruktioner igen"
118
+ resend_confirmation_instructions:
119
+ title: "Send bekræftigelsesinstruktioner igen"
120
+ submit: "Send bekræftigelsesinstruktioner igen"
95
121
  links:
122
+ sign_up: "Opret bruger"
96
123
  sign_in: "Log ind"
97
124
  forgot_your_password: "Glemt din adgangskode?"
98
125
  sign_in_with_omniauth_provider: "Log ind med %{provider}"
126
+ resend_unlock_instructions: "Send oplåsningsinstruktioner igen"
127
+ resend_confirmation_instructions: "Send oplåsningsinstruktioner igen"
128
+ unsupported_browser:
129
+ headline: "Vær venligst opmærksom på, at ActiveAdmin ikke længere understøtter Internet Explorer version 8 eller tidligere."
130
+ recommendation: "Vi anbefaler at du opgraderer til den nyeste <a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, eller <a href=\"https://mozilla.org/firefox/\">Firefox</a>."
131
+ turn_off_compatibility_view: "Hvis du bruger IE 9 eller senere, så vær sikker på, at du <a href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\">slår \"Compatibility View\" fra</a>."
99
132
  access_denied:
100
133
  message: "Du har ikke rettigheder til at udføre denne handling."
101
134
  index_list:
@@ -103,4 +136,3 @@ da:
103
136
  block: "Liste"
104
137
  grid: "Gitter"
105
138
  blog: "Blog"
106
-
@@ -33,7 +33,7 @@ el:
33
33
  less_than: "Μικρότερο από"
34
34
  status_tag:
35
35
  "yes": "Ναι"
36
- "no": "Δεν"
36
+ "no": "Όχι"
37
37
  main_content: "Παρακαλώ υλοποιήστε την %{model}#main_content για να εμφανίσετε περιεχόμενο."
38
38
  logout: "Αποσύνδεση"
39
39
  powered_by: "Powered by %{active_admin} %{version}"
@@ -8,6 +8,7 @@ en:
8
8
  edit: "Edit"
9
9
  delete: "Delete"
10
10
  delete_confirmation: "Are you sure you want to delete this?"
11
+ create_another: "Create another %{model}"
11
12
  new_model: "New %{model}"
12
13
  edit_model: "Edit %{model}"
13
14
  delete_model: "Delete %{model}"
@@ -51,6 +52,7 @@ en:
51
52
  one_page: "Displaying <b>all %{n}</b> %{model}"
52
53
  multiple: "Displaying %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> of <b>%{total}</b> in total"
53
54
  multiple_without_total: "Displaying %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
55
+ per_page: "Per page: "
54
56
  entry:
55
57
  one: "entry"
56
58
  other: "entries"
@@ -51,6 +51,7 @@ fr:
51
51
  one_page: "Affichage des <b>%{n}</b> %{model}"
52
52
  multiple: "Affichage de %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> sur un total de <b>%{total}</b>"
53
53
  multiple_without_total: "Affichage de %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
54
+ per_page: "Par page: "
54
55
  entry:
55
56
  one: "entrée"
56
57
  other: "entrées"
@@ -73,14 +74,18 @@ fr:
73
74
  labels:
74
75
  destroy: "Supprimer"
75
76
  comments:
77
+ created_at: "Créé le"
78
+ resource_type: "Type de ressource"
79
+ author_type: "Profil de l'auteur"
76
80
  body: "Corps"
77
81
  author: "Auteur"
78
82
  title: "Commentaire"
79
83
  add: "Ajouter un commentaire"
84
+ delete: "Supprimer ce commentaire"
85
+ delete_confirmation: "Êtes-vous sûr de vouloir supprimer ce commentaire ?"
80
86
  resource: "Ressource"
81
- resource_type: "Type de ressource"
82
- author_type: "Profil de l'auteur"
83
87
  no_comments_yet: "Aucun commentaire actuellement"
88
+ author_missing: "Anonyme"
84
89
  title_content: "Commentaires (%{count})"
85
90
  errors:
86
91
  empty_text: "Le commentaire n'a pas été enregistré puisque le texte était vide."
@@ -93,6 +98,9 @@ fr:
93
98
  title: "Sous-domaine"
94
99
  password:
95
100
  title: "Mot de passe"
101
+ sign_up:
102
+ title: "S'inscrire"
103
+ submit: "S'inscrire"
96
104
  login:
97
105
  title: "Connexion"
98
106
  remember_me: "Garder ma session ouverte"
@@ -103,13 +111,19 @@ fr:
103
111
  change_password:
104
112
  title: "Changez votre mot de passe"
105
113
  submit: "Changer mon mot de passe"
114
+ unlock:
115
+ title: "Renvoyer les informations de déverrouillage"
116
+ submit: "Renvoyer les informations de déverrouillage"
106
117
  resend_confirmation_instructions:
107
118
  title: "Renvoyer les instructions de confirmation"
108
119
  submit: "Renvoyer les instructions de confirmation"
109
120
  links:
121
+ sign_up: "Inscrivez-vous"
110
122
  sign_in: "Connectez-vous"
111
123
  forgot_your_password: "Vous avez oublié votre mot de passe ?"
112
124
  sign_in_with_omniauth_provider: "Connectez-vous avec %{provider}"
125
+ resend_unlock_instructions: "Renvoyer les informations de déverrouillage"
126
+ resend_confirmation_instructions: "Renvoyer les instructions de confirmation"
113
127
  access_denied:
114
128
  message: "Vous n'êtes pas autorisé à exécuter cette action"
115
129
  index_list:
@@ -51,6 +51,7 @@ ja:
51
51
  one_page: "<b>全 %{n}</b> 件の %{model} を表示しています"
52
52
  multiple: "全 <b>%{total}</b> 件中 <b>%{from}&nbsp;-&nbsp;%{to}</b> 件の %{model} を表示しています"
53
53
  multiple_without_total: "<b>%{from}&nbsp;-&nbsp;%{to}</b> 件の %{model} を表示しています"
54
+ per_page: "表示件数: "
54
55
  entry:
55
56
  one: "レコード"
56
57
  other: "レコード"
@@ -108,5 +108,9 @@
108
108
  sign_in: "登录"
109
109
  forgot_your_password: "忘记了密码?"
110
110
  sign_in_with_omniauth_provider: "登入%{provider}"
111
+ unsupported_browser:
112
+ headline: "很抱歉,ActiveAdmin 已不再支持 Internet Explorer 8 以下版本的浏览器。"
113
+ recommendation: "建议您升级到最新版本的<a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>,<a href=\"https://chrome.google.com/\">Google Chrome</a>,或是 <a href=\"https://mozilla.org/firefox/\">Firefox</a>。"
114
+ turn_off_compatibility_view: "如果您使用的是 IE 9 或更新的版本,请确认<a href=\"https://support.microsoft.com/zh-cn/help/17472/windows-internet-explorer-11-fix-site-display-problems-compatibility-view\">已关闭“兼容性视图”</a>。"
111
115
  access_denied:
112
116
  message: "您无权处理此操作"
@@ -151,3 +151,26 @@ status_tag 'active', :ok
151
151
  status_tag 'active', :ok, class: 'important', id: 'status_123', label: 'on'
152
152
  # => <span class='status_tag active ok important' id='status_123'>on</span>
153
153
  ```
154
+
155
+ ## Tabs
156
+
157
+ The Tabs component is helpful for saving page real estate. The first tab will be
158
+ the one open when the page initially loads and the rest hidden. You can click
159
+ each tab to toggle back and forth between them. Arbre supports unlimited number
160
+ of tabs.
161
+
162
+ ```ruby
163
+ tabs do
164
+ tab :active do
165
+ table_for orders.active do
166
+ ...
167
+ end
168
+ end
169
+
170
+ tab :inactive do
171
+ table_for orders.inactive do
172
+ ...
173
+ end
174
+ end
175
+ end
176
+ ```
@@ -101,7 +101,7 @@ YourModel.solr_search
101
101
 
102
102
  ### Rails 5 scaffold generators
103
103
 
104
- Active Admin requires the `inherited_resources` gem which may break scaffolding under Rails 5 as it replaces the default scaffold generator. The solution is to configure the default controller in `config/application.rb` as outlined in [josevalim/inherited_resources#195](https://github.com/josevalim/inherited_resources/issues/195)
104
+ Active Admin requires the `inherited_resources` gem which may break scaffolding under Rails 5 as it replaces the default scaffold generator. The solution is to configure the default controller in `config/application.rb` as outlined in [activeadmin/inherited_resources#195](https://github.com/activeadmin/inherited_resources/issues/195)
105
105
 
106
106
  ```
107
107
  module SampleApp
@@ -19,9 +19,6 @@ end
19
19
 
20
20
  ## Setting up Strong Parameters
21
21
 
22
- Rails 4 replaces `attr_accessible` with [Strong Parameters](https://github.com/rails/strong_parameters),
23
- which moves attribute whitelisting from the model to the controller.
24
-
25
22
  Use the `permit_params` method to define which attributes may be changed:
26
23
 
27
24
  ```ruby
@@ -316,8 +313,8 @@ end
316
313
 
317
314
  ## Customizing resource retrieval
318
315
 
319
- Our controllers are built on [Inherited Resources](https://github.com/josevalim/inherited_resources),
320
- so you can use [all of its features](https://github.com/josevalim/inherited_resources#overwriting-defaults).
316
+ Our controllers are built on [Inherited Resources](https://github.com/activeadmin/inherited_resources),
317
+ so you can use [all of its features](https://github.com/activeadmin/inherited_resources#overwriting-defaults).
321
318
 
322
319
  If you need to customize the collection properties, you can overwrite the `scoped_collection` method.
323
320
 
@@ -173,3 +173,22 @@ You can arrange content in tabs as shown below:
173
173
  f.actions
174
174
  end
175
175
  ```
176
+
177
+ ## Customize the Create Another checkbox
178
+
179
+ In order to simplify creating multiple resources you may enable ActiveAdmin to show nice "Create Another" checkbox alongside of Create Model
180
+ button. It may be enabled for the whole application:
181
+
182
+ ```ruby
183
+ ActiveAdmin.setup do |config|
184
+ config.create_another = true
185
+ end
186
+ ```
187
+
188
+ or for the particular resource:
189
+
190
+ ```ruby
191
+ ActiveAdmin.register Post do
192
+ config.create_another = true
193
+ end
194
+ ```
@@ -78,31 +78,3 @@ ActiveAdmin.register Book do
78
78
  end
79
79
  end
80
80
  ```
81
-
82
- # Tabs
83
-
84
- You can arrange content in tabs as shown below:
85
-
86
- ```ruby
87
- ActiveAdmin.register Order do
88
- show do
89
- tabs do
90
- tab 'Overview' do
91
- attributes_table do
92
- row(:status) { status_tag(order.status) }
93
- row(:paid) { number_to_currency(order.amount_paid_in_dollars) }
94
- end
95
- end
96
-
97
- tab 'Payments' do
98
- table_for order.payments do
99
- column('Payment Type') { |p| p.payment_type.titleize }
100
- column('Received On', :created_at)
101
- column('Payment Details & Notes', :notes)
102
- column('Amount') { |p| number_to_currency(p.amount_in_dollars) }
103
- end
104
- end
105
- end
106
- end
107
- end
108
- ```
@@ -147,7 +147,6 @@ end
147
147
  When you have dynamic form inputs you can pass a proc instead:
148
148
 
149
149
  ```ruby
150
- # NOTE: multi-pluck is new to Rails 4
151
150
  batch_action :doit, form: -> { {user: User.pluck(:name, :id)} } do |ids, inputs|
152
151
  User.find(inputs[:user])
153
152
  # ...
data/docs/CNAME CHANGED
@@ -1 +1 @@
1
- activeadmin.info
1
+ github-docs.activeadmin.info
@@ -1,7 +1,7 @@
1
1
  <head>
2
2
  <title>Active Admin | The administration framework for Ruby on Rails</title>
3
- <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold' rel='stylesheet' type='text/css'>
4
- <link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
3
+ <link href='//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold' rel='stylesheet' type='text/css'>
4
+ <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
5
5
  <link href="{{ site.baseurl }}/stylesheets/main.css" media="screen" rel="stylesheet" type="text/css" />
6
- <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
7
- </head>
6
+ <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
7
+ </head>
@@ -27,7 +27,7 @@
27
27
  </ol>
28
28
  <li><a href='{{ site.baseurl }}/3-index-pages.html'>Customizing the Index Page</a></li>
29
29
  <ol class='level-2'>
30
- <li><a href='{{ site.baseurl }}/3-index-pages/create-an-index.html'>Create an Index</a></li>
30
+ <li><a href='{{ site.baseurl }}/3-index-pages/custom-index.html'>Custom Index</a></li>
31
31
  <li><a href='{{ site.baseurl }}/3-index-pages/index-as-block.html'>Index as a Block</a></li>
32
32
  <li><a href='{{ site.baseurl }}/3-index-pages/index-as-blog.html'>Index as Blog</a></li>
33
33
  <li><a href='{{ site.baseurl }}/3-index-pages/index-as-grid.html'>Index as a Grid</a></li>
@@ -78,6 +78,7 @@
78
78
  <li><a href='{{ site.baseurl }}/12-arbre-components.html#columns'>Columns</a></li>
79
79
  <li><a href='{{ site.baseurl }}/12-arbre-components.html#table-for'>Table For</a></li>
80
80
  <li><a href='{{ site.baseurl }}/12-arbre-components.html#status-tag'>Status tag</a></li>
81
+ <li><a href='{{ site.baseurl }}/12-arbre-components.html#tabs'>Tabs</a></li>
81
82
  </ol>
82
83
  <li><a href='{{ site.baseurl }}/13-authorization-adapter.html'>Authorization Adapter</a></li>
83
84
  <ol class='level-2'>
@@ -14,7 +14,7 @@ little effort.
14
14
  ### Getting Started
15
15
 
16
16
  Active Admin is released as a Ruby Gem. The gem is to be installed within a Ruby on Rails 4 application. To
17
- install, simply add the following to your Gemfile:</p>
17
+ install, simply add the following to your Gemfile:
18
18
 
19
19
  ```ruby
20
20
  # Gemfile
@@ -50,7 +50,7 @@ $> rails generate active_admin:resource
50
50
  [MyModelName]
51
51
  ```
52
52
 
53
- This creates a file at <tt>app/admin/my_model_names.rb</tt> for configuring the resource. Refresh your web browser to see the interface.</p>
53
+ This creates a file at <tt>app/admin/my_model_names.rb</tt> for configuring the resource. Refresh your web browser to see the interface.
54
54
 
55
55
  ### Next Steps
56
56