Permalink
Browse files

added readme

  • Loading branch information...
parolkar committed Oct 21, 2009
1 parent f42c90f commit f85296f8f211e1c07ad6d3f70cd1c15fb7fcb144
Showing with 19 additions and 17 deletions.
  1. +19 −17 README.markdown
  2. BIN docs/geo_mere_laal.png
View
@@ -1,5 +1,5 @@
-GeoMereLaal
-===========
+GeoMereLaal (जियो मेरे लाल : ji-oo-me-re-laal)
+=================================================
GeoMereLaal plugin is all you need to create Location-Aware rails application based on [W3C Geolocaton API](http://dev.w3.org/geo/api/spec-source.html "W3C draft for geolocation api").
### What's Location-Awareness?
@@ -45,34 +45,36 @@ How do I use it?
<pre><code> script/plugin install git://github.com/parolkar/geo_mere_laal.git </code></pre>
### Step 2 : Create form (as you always did but with new helpers)
Note: You may want to generate Address model this way script/generate model Address street:string locality:string city:string state:string country:string zip:string lat:string lng:string
+
<pre><code>
- <% form_tag('#') do -%>
- <%= label :address,"street","Street" -%>
- <%= street_field :address, "street" %>
+<% form_tag('#') do -%>
+ <%= label :address,"street","Street" -%>
+ <%= street_field :address, "street" %>
- <%= label :address,"locality","Locality" -%>
- <%= locality_field :address, "locality" %>
+ <%= label :address,"locality","Locality" -%>
+ <%= locality_field :address, "locality" %>
- <%= label :address,"city","City" -%>
- <%= city_field :address, "city" %>
+ <%= label :address,"city","City" -%>
+ <%= city_field :address, "city" %>
- <%= label :address,"state","State" -%>
- <%= state_field :address, "state" %>
+ <%= label :address,"state","State" -%>
+ <%= state_field :address, "state" %>
- <%= label :address,"country","Country Name" -%>
- <%= country_name_field :address, "country" %>
+ <%= label :address,"country","Country Name" -%>
+ <%= country_name_field :address, "country" %>
- <%= label :address,"zip","Postal Code" -%>
- <%= postal_code_field :address, "zip" %>
+ <%= label :address,"zip","Postal Code" -%>
+ <%= postal_code_field :address, "zip" %>
- <% end %>
+<% end %>
</code></pre>
### Step 3: ...... there is no step 3 ;-)
The rendered form will auto fill the content with user's geolocation
Output
-------
+------
+
<div class="image">
<img src="/parolkar/geo_mere_laal/raw/master/docs/geo_mere_laal.png"/>
</div>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f85296f

Please sign in to comment.