ubigeo_rails 0.0.3 → 0.0.4

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: f2d2e7f5298844186ac4dff83bd904cae8a90837
4
- data.tar.gz: cfddbd58e4c5cba286d3d4a60aa7c88aadb727c6
3
+ metadata.gz: bbd7a1867a555d8d3e5cb01a2af55a82607d30bb
4
+ data.tar.gz: 4886034d4eed4f3a984d784849ace7f7d71daecd
5
5
  SHA512:
6
- metadata.gz: c13b2e33ff7f9f4aff5ab623529c10e20f2a3e8bbe37284737023d14fae7e22758a2ebb41cce4dbdb937f7d97552a01d1a9aec20f3a37f08e034ee71c71c944c
7
- data.tar.gz: 7831e3f4df8caa87d84d393011cfb5aa6b8cca4aa10a5b77e365d8c2b5e3452782d82f472cdc843e1ff23cbc05e07f27350671cba9941efee65830fd99dca44d
6
+ metadata.gz: bb11c1524dab24872ab20676170bc3f607837e5cbcc5ac382859da42078cbe7c88c78401d9984661d3e3057692ab388fa4459b5cd9be58a0a6a6f40d52d55d6e
7
+ data.tar.gz: 0e0409567cc8da01a9e33c8906cf96cae0b4d18da29e02a98981fa336cea2748ec82055a100671dd4066e54088fff2df638d89fc2a8ff936ff7c91b698fac10d
@@ -42,6 +42,14 @@ module UbigeoRails
42
42
  where parent_id: parent_id
43
43
  end
44
44
 
45
+ def self.departments
46
+ with_parent nil
47
+ end
48
+
49
+ def self.children_of(*departments)
50
+ where(parent_id: departments)
51
+ end
52
+
45
53
  private
46
54
 
47
55
  def digits
data/lib/seeder.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module UbigeoRails
2
4
  extend self
3
5
 
@@ -2067,4 +2069,4 @@ module UbigeoRails
2067
2069
  {"id"=>250401, "name"=>"Purus", "parent_id"=>2504}
2068
2070
  ]
2069
2071
  end
2070
- end
2072
+ end
data/ubigeo_rails.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ubigeo_rails'
3
- s.version = '0.0.3'
3
+ s.version = '0.0.4'
4
4
  s.date = '2013-09-26'
5
5
  s.summary = "A ubigeo formtastic input and api for Rails"
6
6
  s.description = "A ubigeo wrapper"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubigeo_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julio García