form-select 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: fb208f140fe8d77254a5790e69a026c1ed0143df103e17268678dd056372fae6
4
- data.tar.gz: 0f203c9571eefd2b5beb112630c0c0b982f1d46a321386691caf5c36220249a4
3
+ metadata.gz: c2aa026cc47cb3d1716ea9412beb650b14560aa3f0a9b0be3832e67f46ece1ba
4
+ data.tar.gz: 391cb70caa3f0f1177a94816eca9b715228ae5ed0e1594b7e568803f2a5c5029
5
5
  SHA512:
6
- metadata.gz: cab5d849bb5730e850a3f3341d6e4e4c14ee07735d5a09570e61852cbe415f90558ab5e02df9eb452cdc92a6c60c35b3a4d06a54e64b05e01aac75da7146a389
7
- data.tar.gz: b99797d927a45b71ba6965d17510ffc876ac813f59c1992fbafb7de836c4aae907e608144c9d01b67da88aed4883ecd339d489eb6a259ab889192019e7b69e07
6
+ metadata.gz: 70f48c5a4b0623a5adc55f472c3c133a6e16b4d9f8a1734cd70d54641f7ff0b8420c06dcc387d9a58e8026aedfe4bab2c6cadf955ddb3680d66127e06c28aa64
7
+ data.tar.gz: 63b45af7388169fd7a07319cdcc67c5d033ae6200c355811c7a641ded07167fd36aad95f10f014b49031e3621b6ed4a7f5c68cd7ffa0e28bee8c6a706741f42e
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/rails-engine/form-select.svg?branch=master)](https://travis-ci.org/rails-engine/form-select)
4
4
 
5
+ [中文介绍与说明](https://ruby-china.org/topics/37668)
6
+
5
7
  A simple improve for Rails form select helper.
6
8
 
7
9
  We need use `form.select ::category_id, Category.collect { |record| [record.name, record.id] }` in so many case.
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "./form_select/version"
4
- require_relative "./form_select/model"
3
+ require "form_select/version"
4
+ require "form_select/engine"
5
+ require "form_select/model"
5
6
 
6
7
  module FormSelect
7
8
  end
8
9
 
9
- ActiveRecord::Base.send(:include, FormSelect::Model)
10
+
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+ require "rails/engine"
3
+
4
+ module FormSelect
5
+ class Engine < ::Rails::Engine
6
+ ActiveSupport.on_load(:active_record) do
7
+ ActiveRecord::Base.send(:include, FormSelect::Model)
8
+ end
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FormSelect
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: form-select
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-24 00:00:00.000000000 Z
11
+ date: 2018-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -50,6 +50,7 @@ files:
50
50
  - Rakefile
51
51
  - config/routes.rb
52
52
  - lib/form-select.rb
53
+ - lib/form_select/engine.rb
53
54
  - lib/form_select/model.rb
54
55
  - lib/form_select/version.rb
55
56
  homepage: https://github.com/rails-engine/form-select