taiwan_city_dists_helper 0.81 → 0.83

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -20,6 +20,7 @@ And then execute:
20
20
  2. rake db:migrate
21
21
  3. rake taiwan_city_dists_helper:copy
22
22
  4. rake taiwan_city_dists_helper:get_cities_and_dists
23
+ 5. add //= require taiwan_city_dists_helper to your application.js
23
24
 
24
25
  Make sure your object ( let's say Customer ) has relations with city and dist, so you have to
25
26
  add city\_id and dist\_id to your customers table, and define belongs_to in your customer.rb
@@ -56,7 +57,7 @@ will render
56
57
  ### render\_grouped\_dist\_select(FormObject, CollectionOfCities, IncludeBlank?=false)
57
58
  will render
58
59
 
59
- <select id="deal_dist_id" name="deal[dist_id]">
60
+ <select id="customer_dist_id" name="customer[dist_id]">
60
61
  <optgroup label="臺北市">
61
62
  <option value="1">松山區</option>
62
63
  <option value="2">大安區</option>
@@ -97,6 +98,10 @@ Or with form\_for you still can do this
97
98
  <%= render_grouped_dist_select(f, @cities, false) %>
98
99
  <% end %>
99
100
 
101
+ When you using render\_city\_select and render\_grouped\_dist\_select together
102
+
103
+ dist select box will dynamic filter matching options
104
+
100
105
  ## Contributing
101
106
 
102
107
  1. Fork it
@@ -1,5 +1,5 @@
1
1
  module TaiwanCityDistsHelper
2
2
  module Rails
3
- VERSION = "0.81"
3
+ VERSION = "0.83"
4
4
  end
5
5
  end
@@ -1,8 +1,4 @@
1
- require "rails"
2
1
  require "taiwan_city_dists_helper/version"
3
- # require "action_view"
4
- # require "active_record"
5
- # require "nokogiri"
6
2
 
7
3
  module TaiwanCityDistsHelper
8
4
  module Rails
@@ -11,9 +11,6 @@ namespace :taiwan_city_dists_helper do
11
11
  puts "Copy City.rb and Dist.rb to your app/models ..."
12
12
  FileUtils.cp_r("#{source_root}/app/models/.", "#{Rails.root}/app/models", { :preserve => true })
13
13
  puts "============================================================"
14
- puts "Copy taiwan_city_dists.js to your app/assets/javascripts ..."
15
- FileUtils.cp_r("#{source_root}/app/assets/javascripts/.", "#{Rails.root}/app/assets/javascripts", { :preserve => true })
16
- puts "============================================================"
17
14
  puts "Don't forget require taiwan_city_dists_helper js file in your application.js"
18
15
  end
19
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taiwan_city_dists_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.81'
4
+ version: '0.83'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-02 00:00:00.000000000 Z
12
+ date: 2013-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -40,7 +40,6 @@ files:
40
40
  - LICENSE.txt
41
41
  - README.md
42
42
  - Rakefile
43
- - app/assets/javascripts/taiwan_city_dists_helper.js
44
43
  - app/models/city.rb
45
44
  - app/models/dist.rb
46
45
  - lib/generators/taiwan_city_dists_helper/table/table_generator.rb
@@ -51,6 +50,7 @@ files:
51
50
  - lib/taiwan_city_dists_helper/version.rb
52
51
  - lib/tasks/taiwan_city_dists_helper.rake
53
52
  - taiwan_city_dists_helper.gemspec
53
+ - vendor/assets/javascripts/taiwan_city_dists_helper.js
54
54
  homepage: http://github.com/Unayung/taiwan_city_dists_helper
55
55
  licenses: []
56
56
  post_install_message: