effective_style_guide 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc683801962056027264e975207cb98e85a9064b
4
- data.tar.gz: da9b1084ddee2faf65a7f333f817118b3a227393
3
+ metadata.gz: 3d097d92bbbb71bf4b451951a28180bed7861bc7
4
+ data.tar.gz: d09de5a099810ada4cfdd3d9bd130cc2840ede08
5
5
  SHA512:
6
- metadata.gz: 7caed712627d44e591b6d58083231612f3a3f4732981a9f45f39ccd6f8f665050af71d93efa8d4b12307bf0bfb325e3f6c5c1821d1bacbe8e796d22d4c8dcd0a
7
- data.tar.gz: 79a9cab7c6068d88c8f0ae52fdffdada6de4d2ddb353073df69063590fa38e5989824a5d3a1cc3ba9adb1b80de8403a4a561573aab333334f212d5e950e8e91c
6
+ metadata.gz: 0811e17af92a213c854e2aac4682653b6490c9b3f7652514dd099dcdf2930ea2e77ed6e8cf5a9bda6dcc993578d3f927f05cc10fc6f9857d5666086b07a86c0c
7
+ data.tar.gz: 0387830735310bcf04006ab9c1f5c94bdd026af01f36e09dbac458386f0b6b851e7e0579e8fd9b8b70e42f38524e1d11a53c811000c3673cd0c5ae21547320b2
@@ -1,11 +1,13 @@
1
1
  module Effective
2
2
  class StyleGuide < ActiveRecord::Base
3
+ acts_as_asset_box :files => 1..6 if defined?(EffectiveAssets)
4
+
3
5
  def self.columns
4
- @columns ||= [];
6
+ @columns ||= []
5
7
  end
6
8
 
7
9
  def self.column(name, sql_type = nil, default = nil, null = true)
8
- columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
10
+ columns << ::ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
9
11
  end
10
12
 
11
13
  column :id, :integer
@@ -21,8 +23,9 @@ module Effective
21
23
  column :drink, :string
22
24
  column :food, :string
23
25
  column :price, :integer
26
+ column :updated_at, :datetime
24
27
 
25
- validates_presence_of :id, :title, :email, :password, :number, :range, :category, :content, :archived, :drink, :food, :price
28
+ validates_presence_of :id, :title, :email, :password, :number, :range, :category, :content, :archived, :drink, :food, :price, :updated_at
26
29
 
27
30
  end
28
31
  end
@@ -2,8 +2,6 @@
2
2
  = f.input :title, :hint => 'please enter a title (this is a standard text field)'
3
3
  = f.input :email, :hint => 'please enter an email address (this is an email field)'
4
4
  = f.input :password, :hint => 'please enter a password (this is a password field)'
5
- - if defined?(EffectiveOrders)
6
- = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
7
5
  = f.input :number, :hint => 'please enter a number (this is a number field)'
8
6
  = f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
9
7
  = f.input :category, :as => :select, :collection => 10.times.map { |x| "Category #{x}"}, :hint => 'please select a category (this is a select field)'
@@ -13,6 +11,18 @@
13
11
  = f.input :archived, :hint => 'please select true or false (this is a boolean field)'
14
12
  = f.input :drink, :as => :check_boxes, :collection => ['Water', 'Tea', 'Coffee', 'Soda'], :hint => 'please select one or more drinks (this is a check_boxes field)'
15
13
  = f.input :food, :as => :radio_buttons, :collection => ['Pasta', 'Rice', 'Potato', 'Couscous'], :hint => 'please select one food (this is a radio_buttons field)'
14
+
15
+ - if defined?(EffectiveAssets)
16
+ = f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
17
+
18
+ - if defined?(EffectiveFormInputs)
19
+ = f.input :updated_at, :as => :effective_date_time_picker, :hint => 'please enter a datetime (this is an effective_date_time_picker field from EffectiveFormInputs)'
20
+ - else
21
+ = f.input :updated_at, :as => :datetime, :hint => 'please enter a date and time (this is a datetime field)'
22
+
23
+ - if defined?(EffectiveOrders)
24
+ = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
25
+
16
26
  .form-group
17
27
  .col-sm-offset-3.col-sm-9= f.button :submit
18
28
 
@@ -23,8 +33,6 @@
23
33
  = f.input :title, :hint => 'please enter a title (this is a standard text field)'
24
34
  = f.input :email, :hint => 'please enter an email address (this is an email field)'
25
35
  = f.input :password, :hint => 'please enter a password (this is a password field)'
26
- - if defined?(EffectiveOrders)
27
- = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
28
36
  = f.input :number, :hint => 'please enter a number (this is a number field)'
29
37
  = f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
30
38
  = f.input :category, :as => :select, :collection => 10.times.map { |x| "Category #{x}"}, :hint => 'please select a category (this is a select field)'
@@ -34,5 +42,17 @@
34
42
  = f.input :archived, :wrapper => :horizontal_boolean, :hint => 'please select true or false (this is a boolean field)'
35
43
  = f.input :drink, :wrapper => :horizontal_radio_and_checkboxes, :as => :check_boxes, :collection => ['Water', 'Tea', 'Coffee', 'Soda'], :hint => 'please select one or more drinks (this is a check_boxes field)'
36
44
  = f.input :food, :wrapper => :horizontal_radio_and_checkboxes, :as => :radio_buttons, :collection => ['Pasta', 'Rice', 'Potato', 'Couscous'], :hint => 'please select one food (this is a radio_buttons field)'
45
+
46
+ - if defined?(EffectiveAssets)
47
+ = f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
48
+
49
+ - if defined?(EffectiveFormInputs)
50
+ = f.input :updated_at, :as => :effective_date_time_picker, :hint => 'please enter a datetime (this is an effective_date_time_picker field from EffectiveFormInputs)'
51
+ - else
52
+ = f.input :updated_at, :as => :datetime, :hint => 'please enter a date and time (this is a datetime field)'
53
+
54
+ - if defined?(EffectiveOrders)
55
+ = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
56
+
37
57
  .form-group
38
58
  .col-sm-offset-3.col-sm-9= f.button :submit
@@ -2,8 +2,6 @@
2
2
  = f.input :title, :hint => 'please enter a title (this is a standard text field)'
3
3
  = f.input :email, :hint => 'please enter an email address (this is an email field)'
4
4
  = f.input :password, :hint => 'please enter a password (this is a password field)'
5
- - if defined?(EffectiveOrders)
6
- = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
7
5
  = f.input :number, :hint => 'please enter a number (this is a number field)'
8
6
  = f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
9
7
  = f.input :category, :as => :select, :collection => 10.times.map { |x| "Category #{x}"}, :hint => 'please select a category (this is a select field)'
@@ -13,6 +11,18 @@
13
11
  = f.input :archived, :hint => 'please select true or false (this is a boolean field)'
14
12
  = f.input :drink, :as => :check_boxes, :collection => ['Water', 'Tea', 'Coffee', 'Soda'], :hint => 'please select one or more drinks (this is a check_boxes field)'
15
13
  = f.input :food, :as => :radio_buttons, :collection => ['Pasta', 'Rice', 'Potato', 'Couscous'], :hint => 'please select one food (this is a radio_buttons field)'
14
+
15
+ - if defined?(EffectiveAssets)
16
+ = f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
17
+
18
+ - if defined?(EffectiveFormInputs)
19
+ = f.input :updated_at, :as => :effective_date_time_picker, :hint => 'please enter a datetime (this is an effective_date_time_picker field from EffectiveFormInputs)'
20
+ - else
21
+ = f.input :updated_at, :as => :datetime, :hint => 'please enter a date and time (this is a datetime field)'
22
+
23
+ - if defined?(EffectiveOrders)
24
+ = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
25
+
16
26
  = f.button :submit
17
27
 
18
28
  %hr
@@ -22,8 +32,6 @@
22
32
  = f.input :title, :hint => 'please enter a title (this is a standard text field)'
23
33
  = f.input :email, :hint => 'please enter an email address (this is an email field)'
24
34
  = f.input :password, :hint => 'please enter a password (this is a password field)'
25
- - if defined?(EffectiveOrders)
26
- = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
27
35
  = f.input :number, :hint => 'please enter a number (this is a number field)'
28
36
  = f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
29
37
  = f.input :category, :as => :select, :collection => 10.times.map { |x| "Category #{x}"}, :hint => 'please select a category (this is a select field)'
@@ -33,4 +41,16 @@
33
41
  = f.input :archived, :hint => 'please select true or false (this is a boolean field)'
34
42
  = f.input :drink, :as => :check_boxes, :collection => ['Water', 'Tea', 'Coffee', 'Soda'], :hint => 'please select one or more drinks (this is a check_boxes field)'
35
43
  = f.input :food, :as => :radio_buttons, :collection => ['Pasta', 'Rice', 'Potato', 'Couscous'], :hint => 'please select one food (this is a radio_buttons field)'
44
+
45
+ - if defined?(EffectiveAssets)
46
+ = f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
47
+
48
+ - if defined?(EffectiveFormInputs)
49
+ = f.input :updated_at, :as => :effective_date_time_picker, :hint => 'please enter a datetime (this is an effective_date_time_picker field from EffectiveFormInputs)'
50
+ - else
51
+ = f.input :updated_at, :as => :datetime, :hint => 'please enter a date and time (this is a datetime field)'
52
+
53
+ - if defined?(EffectiveOrders)
54
+ = f.input :price, :as => :price, :hint => 'please enter a price (this is a price field from EffectiveOrders)'
55
+
36
56
  = f.button :submit
@@ -1,3 +1,3 @@
1
1
  module EffectiveStyleGuide
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_style_guide
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-08 00:00:00.000000000 Z
11
+ date: 2015-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails