hobo_fields 2.1.0.pre4 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0.pre4
1
+ 2.1.0
@@ -187,6 +187,7 @@ module HoboFields
187
187
  # automatically delcares the 'position' field
188
188
  def self.acts_as_list_with_field_declaration(options = {})
189
189
  declare_field(options.fetch(:column, "position"), :integer)
190
+ default_scope { order("#{self.table_name}.position ASC") }
190
191
  acts_as_list_without_field_declaration(options)
191
192
  end
192
193
 
@@ -339,11 +339,14 @@ Sometimes it's nice to have a proper type name. Here's one way you might go abou
339
339
  Named EnumString's may be translated. Here is an example fr.yml:
340
340
 
341
341
  fr:
342
- article/statuses:
342
+ article/statuss:
343
343
  draft: "esquisse"
344
344
  approved: "approuvé"
345
345
  published: "publiés"
346
346
 
347
+ (Note that in this case, the field name 'status' is pluralized, but very simply by adding an 's', not an 'es'
348
+ as would be gramatically correct.)
349
+
347
350
  Alternatively, the translations may be supplied in ruby:
348
351
 
349
352
  >> Article::Status.translated_values = { "draft"=>"esquisse", "approved"=>"approuvé", "published"=>"publiés" }
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.pre4
5
- prerelease: 6
4
+ version: 2.1.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Tom Locke
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-29 00:00:00.000000000 Z
12
+ date: 2014-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  type: :runtime
@@ -20,13 +20,13 @@ dependencies:
20
20
  requirements:
21
21
  - - '='
22
22
  - !ruby/object:Gem::Version
23
- version: 2.1.0.pre4
23
+ version: 2.1.0
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 2.1.0.pre4
29
+ version: 2.1.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  type: :development
32
32
  name: rubydoctest