effective_form_inputs 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98b06e8541683a63c88431d726aef55d80f22f42
4
- data.tar.gz: beed34183584c0e589488afd005436e5d37df9ab
3
+ metadata.gz: dfb139ee0ac3bdd08159e9eb79359d31bad07c27
4
+ data.tar.gz: 38c3ea428c5d9c184f8a7bc143705b3b6eb5e581
5
5
  SHA512:
6
- metadata.gz: adae80480b8caf15d1ca19548eedbb4587ef6d850deb1085ead6ca7fd373eea4bd64ef25e99e43ba41cbc06dca906faebe3917347abd75aae919a7c7e6d06f40
7
- data.tar.gz: 1038b9a5f82d18b58fef6ef255e95ef7d6f4d13a7c68b78c736f66933a74f29cf439e97eaa9b66d3f3486b1f688bdb645b0e09670941e9f6a9ef5919e70e6352
6
+ metadata.gz: fb0cb297acd58a2d45024bb5906cec6825261bbaefdc6aea4b3030c9c84617db288f51c8d408d8ec9de2818f1ff4492c108e8725add0d6e4aea2f457a9ef2a65
7
+ data.tar.gz: d9254902a855f0abf74936cdbbd26338386b0216f748b42ef1537b706b15e261437b32cbb694eb65205c2fa8449ded1e071c29781a829b107f98008cf6149d3e
data/README.md CHANGED
@@ -1,65 +1,118 @@
1
1
  # Effective Form Inputs
2
2
 
3
- This gem is in active development and should be considered BETA
3
+ Multiple custom Rails Form Helper and SimpleForm inputs in one Rails engine.
4
4
 
5
- The purpose of this gem is to house a whole bunch of Javascript form inputs that can then be all at once brought into a Rails app
5
+ This gem contains numerous custom form inputs along with their Javascript/CSS assets.
6
6
 
7
- Each form input will be a Rails FormBuilder and a simple_form input
7
+ Each included form input is available to both the default Rails Form Helper and SimpleForm.
8
8
 
9
- Right now there's just one form input -- the bootstrap3 datepicker
9
+ Rails 3.2.x and 4.x
10
10
 
11
- ## Installation
11
+ Right now there's just one form input. This will grow.
12
12
 
13
- bundle install the gem
13
+ ## Getting Started
14
14
 
15
- No rails generater to run
15
+ Add to your Gemfile:
16
16
 
17
- If you want to use all inputs:
17
+ ```ruby
18
+ gem 'effective_form_inputs'
19
+ ```
20
+
21
+ Run the bundle command to install it:
22
+
23
+ ```console
24
+ bundle install
25
+ ```
26
+
27
+ ### Install All Form Inputs
18
28
 
29
+ This gem packages the javascript/css assets for numerous form inputs.
30
+
31
+ The assets for these inputs may be included all at once or individually.
32
+
33
+ To install all available inputs, add the following to your application.js:
34
+
35
+ ```ruby
19
36
  //= require effective_form_inputs
20
- @import 'effective_form_inputs';
37
+ ```
21
38
 
22
- Or just one:
39
+ and add the following to your application.css:
23
40
 
24
- //= require effective_date_time_picker/input
25
- @import 'effective_date_time_picker/input';
41
+ ```ruby
42
+ *= require effective_form_inputs
43
+ ```
26
44
 
27
- ## Bootstrap3 Datepicker
45
+ All of the included form inputs will now be available with no additional installation tasks.
28
46
 
29
- https://github.com/Eonasdan/bootstrap-datetimepicker
30
47
 
31
- As a rails FormBuilder
48
+ ## Bootstrap3 DateTimePicker
32
49
 
33
- = f.effective_date_time_picker :updated_at
50
+ This custom form input is based on the following awesome project:
34
51
 
35
- As a SimpleForm input
52
+ Bootstrap 3 Datepicker (https://github.com/Eonasdan/bootstrap-datetimepicker)
36
53
 
37
- = f.input :updated_at, :as => :effective_date_time_picker
38
54
 
39
- ## TODO
55
+ ### Installation
40
56
 
41
- Write a proper README.
57
+ If you've already installed the 'All Form Inputs' assets (see above), there are no additional installation steps.
42
58
 
43
- ## License
59
+ To install this form input individually, add the following to your application.js:
44
60
 
45
- MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
61
+ ```ruby
62
+ //= require effective_date_time_picker/input
63
+ ```
46
64
 
47
- Code and Effect is the product arm of [AgileStyle](http://www.agilestyle.com/), an Edmonton-based shop that specializes in building custom web applications with Ruby on Rails.
65
+ and add the following to your application.css:
66
+
67
+ ```ruby
68
+ *= require effective_date_time_picker/input
69
+ ```
48
70
 
71
+ ### Usage
49
72
 
50
- ## Credits
73
+ As a Rails Form Helper input:
51
74
 
75
+ ```ruby
76
+ = form_for @user do |f|
77
+ = f.effective_date_time_picker :updated_at
78
+ ```
52
79
 
53
- ## Testing
80
+ and as a SimpleForm input:
54
81
 
55
- The test suite for this gem is unfortunately not yet complete.
82
+ ```ruby
83
+ = simple_form_for @user do |f|
84
+ = f.input :updated_at, :as => :effective_date_time_picker
85
+ ```
56
86
 
57
- Run tests by:
87
+ ### Passing Options to JavaScript
88
+
89
+ Any options passed to the form input will be used to initialize the Bootstrap3 DateTimePicker
90
+
91
+ For example (and this works just the same with the SimpleForm input):
58
92
 
59
93
  ```ruby
60
- rake spec
94
+ = form_for @user do |f|
95
+ = f.effective_date_time_picker :updated_at, :format => 'YYYY-MM-DD', :showTodayButton => true
61
96
  ```
62
97
 
98
+ For a full list of options, please refer to:
99
+
100
+ http://eonasdan.github.io/bootstrap-datetimepicker/Options/
101
+
102
+
103
+ ## License
104
+
105
+ MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
106
+
107
+ Code and Effect is the product arm of [AgileStyle](http://www.agilestyle.com/), an Edmonton-based shop that specializes in building custom web applications with Ruby on Rails.
108
+
109
+
110
+ ## Credits
111
+
112
+ The authors of this gem are not associated with any of the awesome projects used in this gem.
113
+
114
+ We are just extending these existing community projects for ease of use with Rails Form Helper and SimpleForm
115
+
63
116
 
64
117
  ## Contributing
65
118
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveFormInputs
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
@@ -3,5 +3,5 @@ require "effective_form_inputs/engine"
3
3
  require "effective_form_inputs/version"
4
4
 
5
5
  module EffectiveFormInputs
6
- REJECTED_INPUT_JS_OPTIONS = [:as, :hint, :error, :readonly, :disabled, :required, :label, :inline_label, :placeholder, :prompt, :min_max, :maxlength, :pattern, :input_html, :wrapper_html, :error_html, :id, :wrapper, :collection]
6
+ REJECTED_INPUT_JS_OPTIONS = [:as, :hint, :error, :readonly, :disabled, :required, :label, :inline_label, :placeholder, :prompt, :min_max, :maxlength, :pattern, :input_html, :wrapper_html, :error_html, :id, :wrapper, :collection, :include_blank]
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_form_inputs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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: 2015-01-27 00:00:00.000000000 Z
11
+ date: 2015-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails