active_scaffold 3.4.35 → 3.4.36
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 +4 -4
- data/CHANGELOG +5 -0
- data/app/views/active_scaffold_overrides/on_update.js.erb +3 -1
- data/lib/active_scaffold/helpers/list_column_helpers.rb +1 -1
- data/lib/active_scaffold/tableless.rb +8 -1
- data/lib/active_scaffold/version.rb +1 -1
- data/lib/tasks/brakeman.rake +16 -0
- data/test/test_helper.rb +4 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c0925aecdf8e8cb67457796ee92dda1238e643
|
4
|
+
data.tar.gz: ca9244cc82582adb62affbd49e316d5b4a5bafd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bf876c309a71dd8a954782e51ce23ff8a20dc937f5562a110cd9814909f9bdd16c0da239cd40c2b79045895235194638d7b0383d68853e031e537b713892ef8
|
7
|
+
data.tar.gz: d7aef2c46b06c3a13a980ae5faf7f1df628802921643a9a92784f4b55066406f7b7da2a99e25c40c5307a0c7ad324d37dc8cd408d7166bf3d037eb7b4ee3e3a1
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
= 3.4.36
|
2
|
+
- Fix tableless for rails >= 4.1 for associations with table
|
3
|
+
- use number_with_precision for non-integer numbers with i18n_number format, so strip_insignificant_zeros and precision can be used
|
4
|
+
|
5
|
+
= 3.4.35
|
1
6
|
- Fix JS error on update columns when request fails and form is loaded on page
|
2
7
|
- Not raise exception when trying to scroll to missing element
|
3
8
|
- Fix error on rails 3.2 caused by a workaround to fix eager load HABTM with scope on rails 4.2
|
@@ -8,7 +8,9 @@ action_link.update_flash_messages('<%= escape_javascript(render(:partial => 'mes
|
|
8
8
|
ActiveScaffold.update_row('<%= row_selector %>', '<%= escape_javascript(render(:partial => 'list_record', :locals => {:record => @record})) %>');
|
9
9
|
action_link.target = $('#<%= row_selector %>');
|
10
10
|
<%= render :partial => 'update_calculations', :formats => [:js] %>
|
11
|
-
|
11
|
+
<% if params[:iframe] == 'true' %>
|
12
|
+
ActiveScaffold.enable_form('<%= form_selector %>');
|
13
|
+
<% end %>
|
12
14
|
<% else %>
|
13
15
|
<% if render_parent? %>
|
14
16
|
<% if nested_singular_association? || render_parent_action == :row %>
|
@@ -132,7 +132,7 @@ module ActiveScaffold
|
|
132
132
|
when :currency
|
133
133
|
number_to_currency(value, options[:i18n_options] || {})
|
134
134
|
when :i18n_number
|
135
|
-
|
135
|
+
send("number_with_#{value.is_a?(Integer) ? 'delimiter' : 'precision'}", value, options[:i18n_options] || {})
|
136
136
|
else
|
137
137
|
value
|
138
138
|
end
|
@@ -4,7 +4,9 @@ class ActiveScaffold::Tableless < ActiveRecord::Base
|
|
4
4
|
klass = alias_tracker ? alias_tracker.connection.klass : self.klass
|
5
5
|
if table_name == klass.table_name
|
6
6
|
klass.columns_hash[column_name]
|
7
|
-
|
7
|
+
elsif alias_tracker && (klass = alias_tracker.instance_variable_get(:@assoc_klass))
|
8
|
+
klass.columns_hash[column_name]
|
9
|
+
else # rails < 4.1
|
8
10
|
association.klass.columns_hash[column_name]
|
9
11
|
end
|
10
12
|
end
|
@@ -14,6 +16,11 @@ class ActiveScaffold::Tableless < ActiveRecord::Base
|
|
14
16
|
def self.scope(association, connection)
|
15
17
|
INSTANCE.scope association, connection
|
16
18
|
end
|
19
|
+
|
20
|
+
def add_constraints(scope, owner, assoc_klass, refl, tracker)
|
21
|
+
tracker.instance_variable_set(:@assoc_klass, assoc_klass)
|
22
|
+
super
|
23
|
+
end
|
17
24
|
end
|
18
25
|
end
|
19
26
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
namespace :brakeman do
|
2
|
+
desc 'Run Brakeman'
|
3
|
+
task :run, :output_files do |_t, args|
|
4
|
+
require 'brakeman'
|
5
|
+
|
6
|
+
files = args[:output_files].split(' ') if args[:output_files]
|
7
|
+
Brakeman.run app_path: '.', output_files: files, print_report: true
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Check your code with Brakeman'
|
11
|
+
task :check do
|
12
|
+
require 'brakeman'
|
13
|
+
result = Brakeman.run app_path: '.', print_report: true
|
14
|
+
exit Brakeman::Warnings_Found_Exit_Code unless result.filtered_warnings.empty?
|
15
|
+
end
|
16
|
+
end
|
data/test/test_helper.rb
CHANGED
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.
|
4
|
+
version: 3.4.36
|
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: 2016-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -331,6 +331,7 @@ files:
|
|
331
331
|
- lib/generators/active_scaffold_controller/active_scaffold_controller_generator.rb
|
332
332
|
- lib/generators/active_scaffold_controller/templates/controller.rb
|
333
333
|
- lib/generators/active_scaffold_controller/templates/helper.rb
|
334
|
+
- lib/tasks/brakeman.rake
|
334
335
|
- public/blank.html
|
335
336
|
- shoulda_macros/macros.rb
|
336
337
|
- test/bridges/bridge_test.rb
|
@@ -444,7 +445,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
444
445
|
version: '0'
|
445
446
|
requirements: []
|
446
447
|
rubyforge_project:
|
447
|
-
rubygems_version: 2.
|
448
|
+
rubygems_version: 2.4.8
|
448
449
|
signing_key:
|
449
450
|
specification_version: 4
|
450
451
|
summary: Rails 3.2, 4.0, 4.1 and 4.2 versions of ActiveScaffold supporting prototype
|