simple-address-generator 0.0.5 → 0.0.6
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.
@@ -23,33 +23,6 @@ module SimpleAddressGenerator
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def insert_to_model
|
27
|
-
inject_into_file "app/models/address.rb", after: "attr_accessible :address_line_1, :address_line_2, :category_id, :city, :country, :latitude, :longitude, :postal_code, :state, :telephone_number" do
|
28
|
-
a = "\n\n attr_accessor :gmaps"
|
29
|
-
b = "\n\n geocoded_by :full_address"
|
30
|
-
c = "\n\n after_validation :geocode"
|
31
|
-
d = "\n\n acts_as_gmappable"
|
32
|
-
e = "\n\n def full_address"
|
33
|
-
f = "\n [self.address_line_1, self.address_line_2, self.city, self.state, self.country, self.postal_code].compact.join(", ")"
|
34
|
-
g = "\n end"
|
35
|
-
h = "\n\n def gmaps4rails_address"
|
36
|
-
i = "\n full_address"
|
37
|
-
j = "\n end"
|
38
|
-
k = "\n\n def gmaps4rails_marker_picture"
|
39
|
-
l = "\n {"
|
40
|
-
m = "\n 'picture' => '/assets/icon-1.png',"
|
41
|
-
n = "\n 'width => 30,"
|
42
|
-
o = "\n height' => 30,"
|
43
|
-
p = "\n 'marker_anchor => [ 5, 10],"
|
44
|
-
q = "\n 'picture' => '/assets/icon-1.png',"
|
45
|
-
r = "\n 'picture' => '/assets/icon-1.png',"
|
46
|
-
s = "\n 'picture' => '/assets/icon-1.png',"
|
47
|
-
t = "\n }"
|
48
|
-
u = "\n end"
|
49
|
-
a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
26
|
def insert_routes
|
54
27
|
route("resources :addresses")
|
55
28
|
end
|