simple_table 0.0.8 → 0.0.9

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.
@@ -18,7 +18,7 @@ module SimpleTable
18
18
 
19
19
  def options_for_record(record, ix, options = {})
20
20
  options.dup.tap do |options|
21
- options[:id] = "#{table.collection_name.singularize}_#{record.id}" #dom_id(record) if record.respond_to?(:new_record?)
21
+ options[:id] = "#{table.collection_name.singularize}_#{record.id}" # dom_id(record) if record.respond_to?(:new_record?)
22
22
  add_class!(options, 'alternate') if ix % 2 == 1
23
23
  end
24
24
  end
@@ -17,11 +17,11 @@ module SimpleTable
17
17
 
18
18
  def translate(content)
19
19
  scope = [SimpleTable.options[:i18n_scope], table.collection_name, :columns].compact
20
- I18n.t(content, :scope => scope)
20
+ table.view.t(content, :scope => scope)
21
21
  end
22
22
 
23
23
  def attribute_name
24
24
  name.to_s.underscore
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -3,7 +3,7 @@ module SimpleTable
3
3
  self.level = 0
4
4
  self.tag_name = :table
5
5
 
6
- attr_reader :body, :head, :foot, :collection, :columns
6
+ attr_reader :view, :body, :head, :foot, :collection, :columns
7
7
 
8
8
  def initialize(view = nil, collection = [], options = {})
9
9
  @view = view
@@ -1,3 +1,3 @@
1
1
  module SimpleTable
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_table
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-01 00:00:00 +01:00
19
+ date: 2010-11-03 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency