active_scaffold 3.4.18.1 → 3.4.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58ec888b57c63fb8dd41136f932245475c26b91d
4
- data.tar.gz: 1020b2766c836faffa21eea4a8701ebb1977f17c
3
+ metadata.gz: 4522a06a683825a65e9660092377e48da966cf7b
4
+ data.tar.gz: 0b81519fc84c1b1e9cc41de416d91a80d25fcdb9
5
5
  SHA512:
6
- metadata.gz: 06a1e78b2f5e9e2b7000e6bf612cb4e7dd9a82370d9531488182f5bbe925b0f9e38f3bd0ef38eb5962a94b9e522ba6c834a25931c214382305835af2522bd355
7
- data.tar.gz: d963a86e6807408b8725e487eda1ff98ad8487e74ad1c25da43fc089f2318600d727377ee2f8b63591d89afe3fd365cd4faf1f94b3905f684f3803a6595b2b80
6
+ metadata.gz: 72fbd86f4e970a0956747ffbda27cf02dd7c3ef75733e4e88af919b6753339f192f3343e158b21ddab2d9c9e12c9951e95a3a18c6a74063658521a04f2630637
7
+ data.tar.gz: 39c90ee5898d11f75d8e587138a641de6edc9048776f243d535fc10b4508ce06395d5e8616060938384d153c40ca81d04330cc2880251af1623ef9695fb43de5
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ - Fix rails bug on set_inverse_instance for has_one :through associations which has_many inverse association
2
+ - Fix warn when form is changed
3
+
4
+ = 3.4.18.1
5
+ - Fix do_destroy for mark action
6
+
1
7
  = 3.4.18
2
8
  - Fix paper_trail bridge on development
3
9
  - Allow to set :data hash in :html_options for action links
@@ -7,7 +13,7 @@
7
13
  - allow to load nested scaffold with nested through associations, even with inplace edit enabled
8
14
  - disable create on nested through associations
9
15
  - Allow to config live_search delay with ActiveScaffold.js_config
10
- - Warn when form is changed (ignores search forms), this featured must be enabled with ActiveScaffold.js_config[:warn_changes]
16
+ - Warn when form is changed (ignores search forms), this featured must be enabled with ActiveScaffold.js_config[:warn_changes], message can be set on <meta name="unload-message" content="..."> tag or ActiveScaffold.js_config[:unload_message]
11
17
 
12
18
  = 3.4.17
13
19
  - Fix deprecation warning "Extra .css in SCSS file is unnecessary"
@@ -296,7 +296,7 @@ jQuery(document).ready(function($) {
296
296
  ActiveScaffold.live_search(document);
297
297
  ActiveScaffold.auto_paginate(document);
298
298
  ActiveScaffold.draggable_lists('.draggable-lists', document);
299
- if (ActiveScaffold.warn_changes) ActiveScaffold.setup_warn_changes();
299
+ if (ActiveScaffold.config.warn_changes) ActiveScaffold.setup_warn_changes();
300
300
  jQuery(document).on('as:element_updated', function(e) {
301
301
  ActiveScaffold.load_embedded(e.target);
302
302
  ActiveScaffold.enable_js_form_buttons(e.target);
@@ -987,7 +987,7 @@ var ActiveScaffold = {
987
987
 
988
988
  setup_warn_changes: function() {
989
989
  var need_confirm = false;
990
- var unload_message = $('meta[name=unload-message]').val() || ActiveScaffold.config.unload_message || "Are you sure you want to navigate away? Any unsaved data will be lost.";
990
+ var unload_message = $('meta[name=unload-message]').attr('content') || ActiveScaffold.config.unload_message || "This page contains unsaved data that will be lost if you leave this page.";
991
991
  $(document).on('change input', '.active-scaffold form:not(.search) input, .active-scaffold form:not(.search) textarea, .active-scaffold form:not(.search) select', function() {
992
992
  $(this).closest('form').addClass('need-confirm');
993
993
  });
@@ -98,8 +98,18 @@ module ActiveScaffold
98
98
  reverse_matches
99
99
  end
100
100
  end
101
+
102
+ module ThroughAssociation
103
+ # NOTE - for now, we're only supporting inverse setting back onto has_one associations.
104
+ # TODO remove when rails fixes this and old versions are not supported
105
+ def invertible_for?(record)
106
+ inverse = super
107
+ inverse && !inverse.collection?
108
+ end
109
+ end
101
110
  end
102
111
  end
103
112
 
104
113
  ActiveRecord::Reflection::AssociationReflection.send :include, ActiveScaffold::ReverseAssociation::AssociationReflection
105
114
  ActiveRecord::Reflection::ThroughReflection.send :include, ActiveScaffold::ReverseAssociation::ThroughReflection
115
+ ActiveRecord::Associations::ThroughAssociation.send :include, ActiveScaffold::ReverseAssociation::ThroughAssociation
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 18.1
5
+ PATCH = 19
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -8,6 +8,6 @@ module RailsApp
8
8
  class Application < Rails::Application
9
9
  config.filter_parameters << :password
10
10
  config.action_mailer.default_url_options = {:host => 'localhost:3000'}
11
- I18n.enforce_available_locales = false
11
+ config.i18n.enforce_available_locales = false if config.i18n.respond_to? :enforce_available_locales
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.18.1
4
+ version: 3.4.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Many, see README
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brakeman