active_scaffold_vho 3.2.5 → 3.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDc3NWI5YWQ0NmNlZTY0YzNiZjBhZmMxZGRlYzdjYjI3OWY2NTYyNw==
4
+ ZGRkMDJiNzc1YjJkNmZkMTViODdmMjEzY2ZkZjg4OGE3OTUxYjgzNw==
5
5
  data.tar.gz: !binary |-
6
- MmYzMzdhMzJmMmNiNTk0NGY4MTAyNzcwZGE2Nzg3YjBhMzhjZDM2Mw==
6
+ YWJkODA0NGI4OTQ1YjMxNmJmYmJhZWQwNWUwNTIwYTQxNjJmNTAyNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2EyYTljMzA2YmE1OWFlMmExNGZjMDZlNThhYzQzM2I5MDBmN2Q0ZTkwNWJj
10
- MDFlZjhhYWQyN2VkMjdiNWM5NjhiNzlkOTE2ZjI2ZDI2YjBiOGU5NGRlNmE1
11
- ZTFmY2Y1M2RiNDAyZjA2OWQ2ZWE4NmQ0OThiOTZjZTY5N2E3M2I=
9
+ ZmY0ZjczYTMyODc4ZTU2YWE2ZjdmZGY3OTg4N2FlNzJjZjMyNTJkM2U0NjY1
10
+ YTI0Y2Y4OTI4Mzc5MjA0MTYyYzlhMGJlNTFmYTliN2Y3MDQ3ZmE3ZThjMDAw
11
+ NGVjYTgzYWI4MWY2MmI4Njc5MTZlY2FiY2RmZDg1NDMwNTYwYTE=
12
12
  data.tar.gz: !binary |-
13
- ZDg0ZTNkMzhlYzdlY2U0NTYwMGQ2NjhlY2NiY2Q2MGE4MTI0YzI5YTU3OWJh
14
- NjFmMWQ2ZjMzNTJlZmY2ZWVhNDkyZjNkZjY1ZThmYjU4YTBiMmU1NmNmMmQz
15
- MWYzNmViYjc5YTJkNDlmZGI0M2QzYmVhZmM1ZWY5OTRmOTdlNGQ=
13
+ OGZkMWE5NmQzMTU0YTlkMTlhMGNhOTRhZTJjYWNjMzFmMmEzMzYwMmJlOTI0
14
+ NTA2MTU0YTVmOTNkMDE3MGFjMWNlMWZiNjA4ZDgyZDU4ZTZmYzEyNThlY2I2
15
+ OTY5NDFmODJlOGQ5ZGNjNWMyZDVlOWU1MDZjM2E1NWVhMzA2Mzg=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_scaffold_vho (3.2.4)
4
+ active_scaffold_vho (3.2.5)
5
5
  kaminari
6
6
  rails (>= 3.1.0)
7
7
 
@@ -73,7 +73,7 @@ GEM
73
73
  rake (>= 0.8.7)
74
74
  rdoc (~> 3.4)
75
75
  thor (>= 0.14.6, < 2.0)
76
- rake (10.3.1)
76
+ rake (10.3.2)
77
77
  rcov (0.9.9)
78
78
  rdoc (3.12.2)
79
79
  json (~> 1.4)
@@ -76,7 +76,12 @@ module ActiveScaffold::Actions
76
76
  })
77
77
  end
78
78
 
79
- @records = find_page(options);
79
+ if active_scaffold_config.model.respond_to?(:tableless?) && active_scaffold_config.model.tableless?
80
+ @records = Kaminari.paginate_array(active_scaffold_config.model.all)
81
+ @records = @records.page(options[:page]).per(options[:per_page]) if options[:pagination]
82
+ else
83
+ @records = find_page(options);
84
+ end
80
85
  @records
81
86
  end
82
87
 
@@ -318,6 +318,7 @@ module ActiveScaffold::DataStructures
318
318
  # just the field (not table.field)
319
319
  def field_name
320
320
  return nil if virtual?
321
+ return column.name if !column.nil? && @active_record_class.respond_to?(:tableless?) && @active_record_class.tableless?
321
322
  column ? @active_record_class.connection.quote_column_name(column.name) : association.foreign_key
322
323
  end
323
324
 
@@ -360,7 +361,7 @@ module ActiveScaffold::DataStructures
360
361
 
361
362
  # the table.field name for this column, if applicable
362
363
  def field
363
- @field ||= [@active_record_class.connection.quote_table_name(@table), field_name].join('.')
364
+ @field ||= (@active_record_class.respond_to?(:tableless?) && @active_record_class.tableless? ? "#{@table}.#{field_name}" : [@active_record_class.connection.quote_table_name(@table), field_name].join('.'))
364
365
  end
365
366
 
366
367
  def estimate_weight
@@ -75,7 +75,7 @@ module ActiveScaffold
75
75
  if column.association
76
76
  associated = associated.is_a?(Array) ? associated.map(&:to_i) : associated.to_i unless associated.nil?
77
77
  method = column.association.macro == :belongs_to ? column.association.foreign_key : column.name
78
- select_options = options_for_association(column.association, true)
78
+ select_options = options_for_association(column.association, false)
79
79
  else
80
80
  method = column.name
81
81
  select_options = Array(column.options[:options])
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 2
5
- PATCH = 5
5
+ PATCH = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_vho
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.6
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: 2014-05-31 00:00:00.000000000 Z
11
+ date: 2014-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda