rails_admin_place_field 0.0.12 → 0.0.13

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: 06dca4f89f425f0fa4e0709b5c73e9420d315677
4
- data.tar.gz: e1eb546f328754a779666c14be2cacdaec126b5b
3
+ metadata.gz: 2e8933c032b804c37bbb4d78d8345860d593d4d2
4
+ data.tar.gz: 842511e3401e3fa136350f74e7bf366c38c7ed09
5
5
  SHA512:
6
- metadata.gz: b3cfe6dfa1e9dad56a863ebaf6cfb10bbe0b2dfa8bf9ce3fd4d78492eba01ed5a24dc770305e76a3384df7e93b4f17973eda052ff0d90103656afed6596bbaeb
7
- data.tar.gz: 52aee01597c3f43d01c58d183aea35959d2ae3f2f5eb92460e1542ba1c56338c1ad1f81fe309ced6c6be8d61fbb8b30bea6ab772212da054e9f2e160c30dcb99
6
+ metadata.gz: 0f7ce7070fdc2632f039802c3488e2ac1117b96c3478b249ef1a2846682868d17c3932d30eabcd50733631e9f54bdb7893bdd73c90ac294d1240553f912a3c04
7
+ data.tar.gz: 53968c1cfe1c0b66f0d1ad04c2e524450697a80f2c960528895a565d7c383d27636c7f15b13f0c31d31792fe606800d212ade287f11c354e7057184fd2a60b06
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Rails Admin Place Field
2
2
 
3
- rails_admin_place_field is a gem that works with [rails_admin](https://github.com/sferik/rails_admin) to provide an easy to use Google Maps interface for displaying and setting geographic co-ordinates in a model and then performing lookups for associations to a nearby Google Place or Foursquare Venue
3
+ rails_admin_place_field is a gem that works with [rails_admin](https://github.com/sferik/rails_admin) to provide an easy to use Google Maps interface for displaying and setting geographic coordinates in a model and then performing lookups for associations to a nearby Google Place or Foursquare Venue
4
4
 
5
5
  Where a latitude and longitude is set on the model, it is indicated by a marker shown on a Google map centered at the marker. The administrator can change the value of these fields by clicking on the desired new location on the map.
6
6
 
7
7
 
8
8
  ## Usage
9
9
 
10
- rails_admin_place_field expects that the model will have two attributes, one for latitude and one for longitude of the point represented. To enable rails_admin_place_field, add the following to your `Gemfile`:
10
+ rails_admin_place_field expects that the model will have two attributes, one for latitude and one for longitude of the point represented. To enable rails_admin_place_field, add the gem to your `Gemfile`. I recommend using the git repo until I release a 1.0.0 version of the gem, however, you can add the [RupyGems](https://rubygems.org/gems/rails_admin_place_field) version if you feel so inclined.
11
11
 
12
12
  ```ruby
13
13
  gem "rails_admin_place_field", :git => "git://github.com/thinkclay/rails_admin_place_field.git"
@@ -19,6 +19,7 @@ Then, add in your `config/initializers/rails_admin.rb` initializer:
19
19
  RailsAdmin.config do |config|
20
20
  config.model Place do
21
21
  edit do
22
+ label "Geo and Place Info"
22
23
  field :latitude, :place
23
24
  field :longitude, :hidden
24
25
  end
@@ -47,6 +48,7 @@ RailsAdmin.config do |config|
47
48
  config.model Place do
48
49
  edit do
49
50
  field :latitude, :place do
51
+ label "Geo and Place Info"
50
52
  longitude_field :longitude
51
53
  foursquare_field :foursquare
52
54
  gplace_field :gplace
@@ -62,6 +64,6 @@ end
62
64
  ```
63
65
 
64
66
  -------
65
- rails_admin_place_field is licensed under the MIT license.
67
+ rails_admin_place_field is licensed under the [MIT license](http://opensource.org/licenses/MIT).
66
68
 
67
- Kudos and credit to [beyondthestory](https://github.com/beyondthestory/rails_admin_map_field) for his map_field which gave me the starting point to learn how to make this field
69
+ Kudos and credit to [beyondthestory](https://github.com/beyondthestory/rails_admin_map_field) for the map_field which gave me the starting point to learn how to make this
@@ -107,9 +107,7 @@
107
107
  google.maps.event.addListener(autocomplete, 'place_changed', function() {
108
108
  var place = autocomplete.getPlace();
109
109
 
110
- console.log(place.id);
111
-
112
- $("##{field.gplace_dom_name}").val(place.id);
110
+ $("##{field.gplace_dom_name}").val(place.reference);
113
111
 
114
112
  if ( ! place.geometry )
115
113
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_place_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clay McIlrath
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-27 00:00:00.000000000 Z
11
+ date: 2013-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: 1.3.6
85
85
  requirements: []
86
86
  rubyforge_project: rails_admin_place_field
87
- rubygems_version: 2.0.3
87
+ rubygems_version: 2.1.5
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Adds a place field to rails_admin using the Google Places and Foursquare