Skip to content

Commit

Permalink
added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
parolkar committed Oct 21, 2009
1 parent f42c90f commit f85296f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions README.markdown
@@ -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"). 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? ### What's Location-Awareness?
Expand Down Expand Up @@ -45,34 +45,36 @@ How do I use it?
<pre><code> script/plugin install git://github.com/parolkar/geo_mere_laal.git </code></pre> <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) ### 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 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> <pre><code>
<% form_tag('#') do -%> <% form_tag('#') do -%>
<%= label :address,"street","Street" -%> <%= label :address,"street","Street" -%>
<%= street_field :address, "street" %> <%= street_field :address, "street" %>


<%= label :address,"locality","Locality" -%> <%= label :address,"locality","Locality" -%>
<%= locality_field :address, "locality" %> <%= locality_field :address, "locality" %>


<%= label :address,"city","City" -%> <%= label :address,"city","City" -%>
<%= city_field :address, "city" %> <%= city_field :address, "city" %>


<%= label :address,"state","State" -%> <%= label :address,"state","State" -%>
<%= state_field :address, "state" %> <%= state_field :address, "state" %>


<%= label :address,"country","Country Name" -%> <%= label :address,"country","Country Name" -%>
<%= country_name_field :address, "country" %> <%= country_name_field :address, "country" %>


<%= label :address,"zip","Postal Code" -%> <%= label :address,"zip","Postal Code" -%>
<%= postal_code_field :address, "zip" %> <%= postal_code_field :address, "zip" %>


<% end %> <% end %>
</code></pre> </code></pre>


### Step 3: ...... there is no step 3 ;-) ### Step 3: ...... there is no step 3 ;-)
The rendered form will auto fill the content with user's geolocation The rendered form will auto fill the content with user's geolocation


Output Output
------ ------

<div class="image"> <div class="image">
<img src="/parolkar/geo_mere_laal/raw/master/docs/geo_mere_laal.png"/> <img src="/parolkar/geo_mere_laal/raw/master/docs/geo_mere_laal.png"/>
</div> </div>
Expand Down
Binary file modified docs/geo_mere_laal.png
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.