simple-address-generator 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -18,6 +18,13 @@ module SimpleAddressGenerator
|
|
18
18
|
|
19
19
|
def insert_code_application
|
20
20
|
inject_into_file "app/views/layouts/application.html.erb", after: "<%= yield %>" do
|
21
|
+
a = "<%= yield:scripts %>"
|
22
|
+
a
|
23
|
+
end
|
24
|
+
end
|
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
|
21
28
|
a = "\n\n attr_accessor :gmaps"
|
22
29
|
b = "\n\n geocoded_by :full_address"
|
23
30
|
c = "\n\n after_validation :geocode"
|
@@ -43,12 +50,6 @@ module SimpleAddressGenerator
|
|
43
50
|
end
|
44
51
|
end
|
45
52
|
|
46
|
-
def insert_to_model
|
47
|
-
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
|
48
|
-
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
53
|
def insert_routes
|
53
54
|
route("resources :addresses")
|
54
55
|
end
|