bhf 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  - data_source ||= field.reflection.klass.all
2
2
  = reflection_node f, field do
3
- - fk = field.reflection.primary_key_name
3
+ - fk = field.reflection.foreign_key
4
4
  %ul
5
5
  - data_source.each do |obj|
6
6
  %li
@@ -1,5 +1,5 @@
1
1
  - data_source ||= field.reflection.klass.all
2
- - fk = field.reflection.primary_key_name
2
+ - fk = field.reflection.foreign_key
3
3
  .node
4
4
  .label= f.label fk, reflection_title(f, field)
5
5
  .input
@@ -15,12 +15,12 @@ module Bhf
15
15
  end
16
16
 
17
17
  class Reflection
18
- attr_reader :name, :macro, :klass, :primary_key_name
18
+ attr_reader :name, :macro, :klass, :foreign_key
19
19
 
20
20
  def initialize(mongoid_field)
21
21
  @name = mongoid_field.name
22
22
  @klass = mongoid_field.class_name.constantize
23
- @primary_key_name = mongoid_field.key
23
+ @foreign_key = mongoid_field.key
24
24
  @macro = case mongoid_field.macro
25
25
  when :references_and_referenced_in_many
26
26
  :has_and_belongs_to_many
data/lib/bhf/platform.rb CHANGED
@@ -187,7 +187,7 @@ module Bhf
187
187
  link: form_options(:links, name)
188
188
  })
189
189
 
190
- fk = all[name.to_s].reflection.primary_key_name
190
+ fk = all[name.to_s].reflection.foreign_key
191
191
  if all.has_key?(fk) and fk != name.to_s
192
192
  all.delete(fk)
193
193
  end
@@ -195,6 +195,7 @@ table.data_table
195
195
  padding: 10px 10px 10px 20px
196
196
  +border-top-radius(4)
197
197
  +box-shadow(0, 1, 4, #ccc)
198
+ background: #C9C9C9
198
199
  background: -webkit-gradient(linear, left top, left bottom, from(#CCCCCC), color-stop(50%, #CCCCCC), color-stop(51%, #DCDCDC), to(#DCDCDC))
199
200
  background-size: 0 2px
200
201
  text-align: left
@@ -883,6 +884,7 @@ input[type="submit"].alt_button,
883
884
  z-index: 4000
884
885
  +border-bottom-radius(4)
885
886
  background: url(ajax_loader.gif) no-repeat center 16px, -webkit-gradient(linear, left top, left bottom, from($b1), to($b2))
887
+ background: url(ajax_loader.gif) no-repeat center 16px, -moz-linear-gradient(top, $b1, $b2)
886
888
  border: 1px solid $b1
887
889
  +box-shadow(0, 1, 4)
888
890
  +transition-duration(0.6)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bhf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-15 00:00:00.000000000Z
12
+ date: 2012-01-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70345617688620 !ruby/object:Gem::Requirement
16
+ requirement: &70195746909300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70345617688620
24
+ version_requirements: *70195746909300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: kaminari
27
- requirement: &70345617688140 !ruby/object:Gem::Requirement
27
+ requirement: &70195746908360 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.12.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70345617688140
35
+ version_requirements: *70195746908360
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: haml-rails
38
- requirement: &70345617687640 !ruby/object:Gem::Requirement
38
+ requirement: &70195746907640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.3.4
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70345617687640
46
+ version_requirements: *70195746907640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sass-rails
49
- requirement: &70345617687140 !ruby/object:Gem::Requirement
49
+ requirement: &70195746907000 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 3.1.4
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70345617687140
57
+ version_requirements: *70195746907000
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mootools-rails
60
- requirement: &70345617686560 !ruby/object:Gem::Requirement
60
+ requirement: &70195746906340 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0.4'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70345617686560
68
+ version_requirements: *70195746906340
69
69
  description: Gets you there on time
70
70
  email: anton.pawlik@gmail.com
71
71
  executables: []