├── .gitignore ├── .ruby-version ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── app ├── assets │ ├── images │ │ ├── .keep │ │ └── mapper.png │ ├── javascripts │ │ └── application.js │ └── stylesheets │ │ └── application.scss ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ └── flats_controller.rb ├── helpers │ ├── application_helper.rb │ └── flats_helper.rb ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── concerns │ │ └── .keep │ └── flat.rb └── views │ ├── flats │ ├── _form.html.erb │ ├── _map_box.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ ├── new.html.erb │ └── show.html.erb │ └── layouts │ └── application.html.erb ├── bin ├── bundle ├── rails └── rake ├── config.ru ├── config ├── application.rb ├── boot.rb ├── database.yml ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── backtrace_silencers.rb │ ├── filter_parameter_logging.rb │ ├── geocoder.rb │ ├── inflections.rb │ ├── mime_types.rb │ ├── secret_token.rb │ ├── session_store.rb │ └── wrap_parameters.rb ├── locales │ └── en.yml ├── puma.rb └── routes.rb ├── db ├── migrate │ ├── 20140523120948_create_flats.rb │ └── 20140523131531_add_latitude_and_longitude_to_flat.rb ├── schema.rb └── seeds.rb ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── log └── .keep ├── public ├── 404.html ├── 422.html ├── 500.html ├── favicon.ico └── robots.txt ├── test ├── controllers │ ├── .keep │ └── flats_controller_test.rb ├── fixtures │ ├── .keep │ └── flats.yml ├── helpers │ ├── .keep │ └── flats_helper_test.rb ├── integration │ └── .keep ├── mailers │ └── .keep ├── models │ ├── .keep │ └── flat_test.rb └── test_helper.rb └── vendor └── assets ├── javascripts └── .keep └── stylesheets └── .keep /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/*.log 16 | /tmp 17 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.6.6 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | ruby "2.6.6" 4 | gem "rails", "5.0.5" 5 | gem "pg" 6 | gem "puma" 7 | 8 | gem "sass-rails" 9 | gem "uglifier" 10 | gem "jquery-rails" 11 | gem "bootstrap-sass" 12 | gem "coffee-rails" 13 | 14 | gem "geocoder" 15 | gem "gmaps4rails" 16 | 17 | source "https://rails-assets.org" do 18 | gem "rails-assets-underscore" 19 | end 20 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | remote: https://rails-assets.org/ 4 | specs: 5 | actioncable (5.0.5) 6 | actionpack (= 5.0.5) 7 | nio4r (>= 1.2, < 3.0) 8 | websocket-driver (~> 0.6.1) 9 | actionmailer (5.0.5) 10 | actionpack (= 5.0.5) 11 | actionview (= 5.0.5) 12 | activejob (= 5.0.5) 13 | mail (~> 2.5, >= 2.5.4) 14 | rails-dom-testing (~> 2.0) 15 | actionpack (5.0.5) 16 | actionview (= 5.0.5) 17 | activesupport (= 5.0.5) 18 | rack (~> 2.0) 19 | rack-test (~> 0.6.3) 20 | rails-dom-testing (~> 2.0) 21 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 22 | actionview (5.0.5) 23 | activesupport (= 5.0.5) 24 | builder (~> 3.1) 25 | erubis (~> 2.7.0) 26 | rails-dom-testing (~> 2.0) 27 | rails-html-sanitizer (~> 1.0, >= 1.0.3) 28 | activejob (5.0.5) 29 | activesupport (= 5.0.5) 30 | globalid (>= 0.3.6) 31 | activemodel (5.0.5) 32 | activesupport (= 5.0.5) 33 | activerecord (5.0.5) 34 | activemodel (= 5.0.5) 35 | activesupport (= 5.0.5) 36 | arel (~> 7.0) 37 | activesupport (5.0.5) 38 | concurrent-ruby (~> 1.0, >= 1.0.2) 39 | i18n (~> 0.7) 40 | minitest (~> 5.1) 41 | tzinfo (~> 1.1) 42 | arel (7.1.4) 43 | autoprefixer-rails (6.4.0.1) 44 | execjs 45 | bootstrap-sass (3.3.7) 46 | autoprefixer-rails (>= 5.2.1) 47 | sass (>= 3.3.4) 48 | builder (3.2.3) 49 | coffee-rails (4.2.1) 50 | coffee-script (>= 2.2.0) 51 | railties (>= 4.0.0, < 5.2.x) 52 | coffee-script (2.4.1) 53 | coffee-script-source 54 | execjs 55 | coffee-script-source (1.10.0) 56 | concurrent-ruby (1.0.5) 57 | crass (1.0.4) 58 | erubis (2.7.0) 59 | execjs (2.7.0) 60 | geocoder (1.3.7) 61 | globalid (0.4.0) 62 | activesupport (>= 4.2.0) 63 | gmaps4rails (2.1.2) 64 | i18n (0.8.6) 65 | jquery-rails (4.1.1) 66 | rails-dom-testing (>= 1, < 3) 67 | railties (>= 4.2.0) 68 | thor (>= 0.14, < 2.0) 69 | json (2.0.2) 70 | loofah (2.2.3) 71 | crass (~> 1.0.2) 72 | nokogiri (>= 1.5.9) 73 | mail (2.6.6) 74 | mime-types (>= 1.16, < 4) 75 | method_source (0.8.2) 76 | mime-types (3.1) 77 | mime-types-data (~> 3.2015) 78 | mime-types-data (3.2016.0521) 79 | mini_portile2 (2.3.0) 80 | minitest (5.10.3) 81 | nio4r (2.1.0) 82 | nokogiri (1.8.5) 83 | mini_portile2 (~> 2.3.0) 84 | pg (0.18.4) 85 | puma (5.0.2) 86 | nio4r (~> 2.0) 87 | rack (2.0.6) 88 | rack-test (0.6.3) 89 | rack (>= 1.0) 90 | rails (5.0.5) 91 | actioncable (= 5.0.5) 92 | actionmailer (= 5.0.5) 93 | actionpack (= 5.0.5) 94 | actionview (= 5.0.5) 95 | activejob (= 5.0.5) 96 | activemodel (= 5.0.5) 97 | activerecord (= 5.0.5) 98 | activesupport (= 5.0.5) 99 | bundler (>= 1.3.0) 100 | railties (= 5.0.5) 101 | sprockets-rails (>= 2.0.0) 102 | rails-assets-underscore (1.8.3) 103 | rails-dom-testing (2.0.3) 104 | activesupport (>= 4.2.0) 105 | nokogiri (>= 1.6) 106 | rails-html-sanitizer (1.0.4) 107 | loofah (~> 2.2, >= 2.2.2) 108 | railties (5.0.5) 109 | actionpack (= 5.0.5) 110 | activesupport (= 5.0.5) 111 | method_source 112 | rake (>= 0.8.7) 113 | thor (>= 0.18.1, < 2.0) 114 | rake (12.0.0) 115 | sass (3.4.22) 116 | sass-rails (5.0.6) 117 | railties (>= 4.0.0, < 6) 118 | sass (~> 3.1) 119 | sprockets (>= 2.8, < 4.0) 120 | sprockets-rails (>= 2.0, < 4.0) 121 | tilt (>= 1.1, < 3) 122 | sprockets (3.7.2) 123 | concurrent-ruby (~> 1.0) 124 | rack (> 1, < 3) 125 | sprockets-rails (3.2.0) 126 | actionpack (>= 4.0) 127 | activesupport (>= 4.0) 128 | sprockets (>= 3.0.0) 129 | thor (0.20.0) 130 | thread_safe (0.3.6) 131 | tilt (2.0.5) 132 | tzinfo (1.2.3) 133 | thread_safe (~> 0.1) 134 | uglifier (2.7.2) 135 | execjs (>= 0.3.0) 136 | json (>= 1.8.0) 137 | websocket-driver (0.6.5) 138 | websocket-extensions (>= 0.1.0) 139 | websocket-extensions (0.1.2) 140 | 141 | PLATFORMS 142 | ruby 143 | 144 | DEPENDENCIES 145 | bootstrap-sass 146 | coffee-rails 147 | geocoder 148 | gmaps4rails 149 | jquery-rails 150 | pg 151 | puma 152 | rails (= 5.0.5) 153 | rails-assets-underscore! 154 | sass-rails 155 | uglifier 156 | 157 | RUBY VERSION 158 | ruby 2.6.6p146 159 | 160 | BUNDLED WITH 161 | 1.17.2 162 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | © 2023 La Loco SAS, head of Le Wagon Group - All rights reserved 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Testing the app 2 | 3 | - fork / clone the repo 4 | - run `bundle install` to install missing gems 5 | - run `rails db:create` and `rails db:migrate` to create the DB and set up its scheme 6 | - `rails db:seed` to populate your database 7 | - `rails s` to test the app 8 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | MapsExample::Application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/app/assets/images/.keep -------------------------------------------------------------------------------- /app/assets/images/mapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/app/assets/images/mapper.png -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require jquery_ujs 15 | //= require underscore 16 | //= require gmaps/google 17 | //= require_tree . 18 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.scss: -------------------------------------------------------------------------------- 1 | @import 'bootstrap-sprockets'; 2 | @import 'bootstrap'; 3 | 4 | body { 5 | padding-top: 60px; 6 | } 7 | 8 | .map_box { 9 | padding: 10px; 10 | } -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/flats_controller.rb: -------------------------------------------------------------------------------- 1 | class FlatsController < ApplicationController 2 | before_action :set_flat, only: [:show, :edit, :update, :destroy] 3 | 4 | # GET /flats 5 | # GET /flats.json 6 | def index 7 | @flats = Flat.where.not(latitude: nil, longitude: nil) 8 | 9 | @hash = Gmaps4rails.build_markers(@flats) do |flat, marker| 10 | marker.lat flat.latitude 11 | marker.lng flat.longitude 12 | marker.infowindow render_to_string(partial: "/flats/map_box", locals: { flat: flat }) 13 | end 14 | end 15 | 16 | # GET /flats/1 17 | # GET /flats/1.json 18 | def show 19 | end 20 | 21 | # GET /flats/new 22 | def new 23 | @flat = Flat.new 24 | end 25 | 26 | # GET /flats/1/edit 27 | def edit 28 | end 29 | 30 | # POST /flats 31 | # POST /flats.json 32 | def create 33 | @flat = Flat.new(flat_params) 34 | 35 | if @flat.save 36 | redirect_to flats_path, notice: 'Flat was successfully created.' 37 | else 38 | render action: 'new' 39 | end 40 | end 41 | 42 | # PATCH/PUT /flats/1 43 | # PATCH/PUT /flats/1.json 44 | def update 45 | if @flat.update(flat_params) 46 | redirect_to @flat, notice: 'Flat was successfully updated.' 47 | else 48 | render action: 'edit' 49 | end 50 | end 51 | 52 | # DELETE /flats/1 53 | # DELETE /flats/1.json 54 | def destroy 55 | @flat.destroy 56 | respond_to do |format| 57 | format.html { redirect_to flats_url } 58 | format.json { head :no_content } 59 | end 60 | end 61 | 62 | private 63 | # Use callbacks to share common setup or constraints between actions. 64 | def set_flat 65 | @flat = Flat.find(params[:id]) 66 | end 67 | 68 | # Never trust parameters from the scary internet, only allow the white list through. 69 | def flat_params 70 | params.require(:flat).permit(:name, :address) 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/flats_helper.rb: -------------------------------------------------------------------------------- 1 | module FlatsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/app/mailers/.keep -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/app/models/.keep -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/models/flat.rb: -------------------------------------------------------------------------------- 1 | class Flat < ActiveRecord::Base 2 | geocoded_by :address 3 | after_validation :geocode 4 | end 5 | -------------------------------------------------------------------------------- /app/views/flats/_form.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |

Create/Edit your flat

6 | 7 | <%= form_for(@flat) do |f| %> 8 | <% if @flat.errors.any? %> 9 |
10 |

<%= pluralize(@flat.errors.count, "error") %> prohibited this flat from being saved:

11 | 12 |
    13 | <% @flat.errors.full_messages.each do |msg| %> 14 |
  • <%= msg %>
  • 15 | <% end %> 16 |
17 |
18 | <% end %> 19 | 20 |
21 | <%= f.label :name %> 22 | <%= f.text_field :name, class: "form-control" %> 23 |
24 | 25 |
26 | <%= f.label :address %> 27 | <%= f.text_field :address, class: "form-control" %> 28 |
29 | 30 |
31 | <%= f.submit "GO", class: "btn btn-primary" %> 32 |
33 | <% end %> 34 | 35 | 36 |
37 |
38 | 39 |
40 | -------------------------------------------------------------------------------- /app/views/flats/_map_box.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

<%= flat.name %>

3 |

<%= flat.address %>

4 | <%= link_to "Details", flat_path(flat), target: :blank, class: "btn btn-warning" %> 5 |
6 | -------------------------------------------------------------------------------- /app/views/flats/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing flat

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @flat %> | 6 | <%= link_to 'Back', flats_path %> 7 | -------------------------------------------------------------------------------- /app/views/flats/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | <%= link_to new_flat_path do %> 7 | 8 | <% end %> 9 | 10 |
11 | 12 | <% @flats.each do |flat| %> 13 |
14 |

<%= link_to flat.name, flat %>

15 |

<%= flat.address %>

16 | <%= link_to "Edit", edit_flat_path(flat), class: "btn btn-default" %> 17 | or 18 | <%= link_to "delete", flat, method: :delete, data: { confirm: 'Are you sure?' } %> 19 |
20 | <% end %> 21 |
22 |
23 | 24 | <% content_for(:after_js) do %> 25 | 38 | <% end %> 39 | -------------------------------------------------------------------------------- /app/views/flats/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'form' %> 2 | -------------------------------------------------------------------------------- /app/views/flats/show.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

<%= @flat.name %>

5 |

<%= @flat.address %>

6 |

Latitude: <%= @flat.latitude %>

7 |

Longitude: <%= @flat.longitude %>

8 | 9 | <%= link_to "Edit", edit_flat_path(@flat), class: "btn btn-primary" %> 10 | or 11 | <%= link_to "get batck to list", flats_path %> 12 |
13 | 14 |
15 | 16 |
17 | <%= image_tag "https://maps.googleapis.com/maps/api/staticmap?center=#{@flat.latitude},#{@flat.longitude}&zoom=14&size=640x400&markers=color:black%7C#{@flat.latitude},#{@flat.longitude}" %> 18 |
19 | 20 |
21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dynamic Google Maps 5 | <%= stylesheet_link_tag "application", media: "all" %> 6 | <%= csrf_meta_tags %> 7 | 8 | 9 | 10 |
11 | <%= yield %> 12 |
13 | 14 | <%= javascript_include_tag "https://maps.google.com/maps/api/js?key=AIzaSyDANjx3bosEtIyzJaoWs50Wnt6nt_1rmxU" %> 15 | <%= javascript_include_tag "https://cdn.rawgit.com/printercu/google-maps-utility-library-v3-read-only/master/markerclusterer/src/markerclusterer_compiled.js" %> 16 | <%= javascript_include_tag "https://cdn.rawgit.com/printercu/google-maps-utility-library-v3-read-only/master/infobox/src/infobox_packed.js" %> 17 | 18 | <%= javascript_include_tag "application" %> 19 | 20 | <%= yield(:after_js) %> 21 | 22 | 23 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../boot', __FILE__) 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module MapsExample 10 | class Application < Rails::Application 11 | # Settings in config/environments/* take precedence over those specified here. 12 | # Application configuration should go into files in config/initializers 13 | # -- all .rb files in that directory are automatically loaded. 14 | 15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 17 | # config.time_zone = 'Central Time (US & Canada)' 18 | 19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 21 | # config.i18n.default_locale = :de 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | 4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 5 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | # PostgreSQL. Versions 8.2 and up are supported. 2 | # 3 | # Install the pg driver: 4 | # gem install pg 5 | # On OS X with Homebrew: 6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config 7 | # On OS X with MacPorts: 8 | # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config 9 | # On Windows: 10 | # gem install pg 11 | # Choose the win32 build. 12 | # Install PostgreSQL and put its /bin directory on your path. 13 | # 14 | # Configure Using Gemfile 15 | # gem 'pg' 16 | # 17 | development: 18 | adapter: postgresql 19 | encoding: unicode 20 | database: maps_example_development 21 | pool: 5 22 | 23 | # Connect on a TCP socket. Omitted by default since the client uses a 24 | # domain socket that doesn't need configuration. Windows does not have 25 | # domain sockets, so uncomment these lines. 26 | #host: localhost 27 | 28 | # The TCP port the server listens on. Defaults to 5432. 29 | # If your server runs on a different port number, change accordingly. 30 | #port: 5432 31 | 32 | # Schema search path. The server defaults to $user,public 33 | #schema_search_path: myapp,sharedapp,public 34 | 35 | # Minimum log levels, in increasing order: 36 | # debug5, debug4, debug3, debug2, debug1, 37 | # log, notice, warning, error, fatal, and panic 38 | # Defaults to warning. 39 | #min_messages: notice 40 | 41 | # Warning: The database defined as "test" will be erased and 42 | # re-generated from your development database when you run "rake". 43 | # Do not set this db to the same as development or production. 44 | test: 45 | adapter: postgresql 46 | encoding: unicode 47 | database: maps_example_test 48 | pool: 5 49 | 50 | production: 51 | adapter: postgresql 52 | encoding: unicode 53 | database: maps_example_production 54 | pool: 5 55 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | MapsExample::Application.initialize! 6 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | MapsExample::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports and disable caching. 13 | config.consider_all_requests_local = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send. 17 | config.action_mailer.raise_delivery_errors = false 18 | 19 | # Print deprecation notices to the Rails logger. 20 | config.active_support.deprecation = :log 21 | 22 | # Raise an error on page load if there are pending migrations 23 | config.active_record.migration_error = :page_load 24 | 25 | # Debug mode disables concatenation and preprocessing of assets. 26 | # This option may cause significant delays in view rendering with a large 27 | # number of complex assets. 28 | config.assets.debug = true 29 | end 30 | -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | MapsExample::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both thread web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 18 | # Add `rack-cache` to your Gemfile before enabling this. 19 | # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 20 | # config.action_dispatch.rack_cache = true 21 | 22 | # Disable Rails's static asset server (Apache or nginx will already do this). 23 | config.serve_static_assets = false 24 | 25 | # Compress JavaScripts and CSS. 26 | config.assets.js_compressor = :uglifier 27 | # config.assets.css_compressor = :sass 28 | 29 | # Do not fallback to assets pipeline if a precompiled asset is missed. 30 | config.assets.compile = false 31 | 32 | # Generate digests for assets URLs. 33 | config.assets.digest = true 34 | 35 | # Version of your assets, change this if you want to expire all your assets. 36 | config.assets.version = '1.0' 37 | 38 | # Specifies the header that your server uses for sending files. 39 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache 40 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 41 | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 43 | # config.force_ssl = true 44 | 45 | # Set to :debug to see everything in the log. 46 | config.log_level = :info 47 | 48 | # Prepend all log lines with the following tags. 49 | # config.log_tags = [ :subdomain, :uuid ] 50 | 51 | # Use a different logger for distributed setups. 52 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 53 | 54 | # Use a different cache store in production. 55 | # config.cache_store = :mem_cache_store 56 | 57 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 58 | # config.action_controller.asset_host = "http://assets.example.com" 59 | 60 | # Precompile additional assets. 61 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 62 | # config.assets.precompile += %w( search.js ) 63 | 64 | # Ignore bad email addresses and do not raise email delivery errors. 65 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 66 | # config.action_mailer.raise_delivery_errors = false 67 | 68 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 69 | # the I18n.default_locale when a translation can not be found). 70 | config.i18n.fallbacks = true 71 | 72 | # Send deprecation notices to registered listeners. 73 | config.active_support.deprecation = :notify 74 | 75 | # Disable automatic flushing of the log to improve performance. 76 | # config.autoflush_log = false 77 | 78 | # Use default logging formatter so that PID and timestamp are not suppressed. 79 | config.log_formatter = ::Logger::Formatter.new 80 | end 81 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | MapsExample::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure static asset server for tests with Cache-Control for performance. 16 | config.serve_static_assets = true 17 | config.static_cache_control = "public, max-age=3600" 18 | 19 | # Show full error reports and disable caching. 20 | config.consider_all_requests_local = true 21 | config.action_controller.perform_caching = false 22 | 23 | # Raise exceptions instead of rendering exception templates. 24 | config.action_dispatch.show_exceptions = false 25 | 26 | # Disable request forgery protection in test environment. 27 | config.action_controller.allow_forgery_protection = false 28 | 29 | # Tell Action Mailer not to deliver emails to the real world. 30 | # The :test delivery method accumulates sent emails in the 31 | # ActionMailer::Base.deliveries array. 32 | config.action_mailer.delivery_method = :test 33 | 34 | # Print deprecation notices to the stderr. 35 | config.active_support.deprecation = :stderr 36 | end 37 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /config/initializers/geocoder.rb: -------------------------------------------------------------------------------- 1 | Geocoder.configure( 2 | # geocoding options 3 | # :timeout => 3, # geocoding service timeout (secs) 4 | :lookup => :google, # name of geocoding service (symbol) 5 | # :language => :en, # ISO-639 language code 6 | :use_https => true, # use HTTPS for lookup requests? (if supported) 7 | # :http_proxy => nil, # HTTP proxy server (user:pass@host:port) 8 | # :https_proxy => nil, # HTTPS proxy server (user:pass@host:port) 9 | :api_key => ENV["GOOGLE_SERVER_API_KEY"], # API key for geocoding service 10 | # :cache => nil, # cache object (must respond to #[], #[]=, and #keys) 11 | # :cache_prefix => "geocoder:", # prefix (string) to use for all cache keys 12 | 13 | # exceptions that should not be rescued by default 14 | # (if you want to implement custom error handling); 15 | # supports SocketError and TimeoutError 16 | # :always_raise => [], 17 | 18 | # calculation options 19 | # :units => :mi, # :km for kilometers or :mi for miles 20 | # :distances => :linear # :spherical or :linear 21 | ) 22 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /config/initializers/secret_token.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key is used for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | 6 | # Make sure the secret is at least 30 characters and all random, 7 | # no regular words or you'll be exposed to dictionary attacks. 8 | # You can use `rake secret` to generate a secure secret key. 9 | 10 | # Make sure your secret_key_base is kept private 11 | # if you're sharing your code publicly. 12 | MapsExample::Application.config.secret_key_base = '324c757b05ae04719964becd011a284d0a2e64a30d1e24429d6fc9d00997de9a6e0d9e479d67333f1b0de24737c669bcff34b647650c39b1749e76892588cae5' 13 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | MapsExample::Application.config.session_store :cookie_store, key: '_maps_example_session' 4 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /config/puma.rb: -------------------------------------------------------------------------------- 1 | # Puma can serve each request in a thread from an internal thread pool. 2 | # The `threads` method setting takes two numbers a minimum and maximum. 3 | # Any libraries that use thread pools should be configured to match 4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum 5 | # and maximum, this matches the default thread size of Active Record. 6 | # 7 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i 8 | threads threads_count, threads_count 9 | 10 | # Specifies the `port` that Puma will listen on to receive requests, default is 3000. 11 | # 12 | port ENV.fetch("PORT") { 3000 } 13 | 14 | # Specifies the `environment` that Puma will run in. 15 | # 16 | environment ENV.fetch("RAILS_ENV") { "development" } 17 | 18 | # Specifies the number of `workers` to boot in clustered mode. 19 | # Workers are forked webserver processes. If using threads and workers together 20 | # the concurrency of the application would be max `threads` * `workers`. 21 | # Workers do not work on JRuby or Windows (both of which do not support 22 | # processes). 23 | # 24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 } 25 | 26 | # Use the `preload_app!` method when specifying a `workers` number. 27 | # This directive tells Puma to first boot the application and load code 28 | # before forking the application. This takes advantage of Copy On Write 29 | # process behavior so workers use less memory. If you use this option 30 | # you need to make sure to reconnect any threads in the `on_worker_boot` 31 | # block. 32 | # 33 | # preload_app! 34 | 35 | # The code in the `on_worker_boot` will be called if you are using 36 | # clustered mode by specifying a number of `workers`. After each worker 37 | # process is booted this block will be run, if you are using `preload_app!` 38 | # option you will want to use this block to reconnect to any threads 39 | # or connections that may have been created at application boot, Ruby 40 | # cannot share connections between processes. 41 | # 42 | # on_worker_boot do 43 | # ActiveRecord::Base.establish_connection if defined?(ActiveRecord) 44 | # end 45 | 46 | # Allow puma to be restarted by `rails restart` command. 47 | plugin :tmp_restart 48 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | MapsExample::Application.routes.draw do 2 | 3 | root "flats#index" 4 | resources :flats 5 | 6 | # The priority is based upon order of creation: first created -> highest priority. 7 | # See how all your routes lay out with "rake routes". 8 | 9 | # You can have the root of your site routed with "root" 10 | # root 'welcome#index' 11 | 12 | # Example of regular route: 13 | # get 'products/:id' => 'catalog#view' 14 | 15 | # Example of named route that can be invoked with purchase_url(id: product.id) 16 | # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase 17 | 18 | # Example resource route (maps HTTP verbs to controller actions automatically): 19 | # resources :products 20 | 21 | # Example resource route with options: 22 | # resources :products do 23 | # member do 24 | # get 'short' 25 | # post 'toggle' 26 | # end 27 | # 28 | # collection do 29 | # get 'sold' 30 | # end 31 | # end 32 | 33 | # Example resource route with sub-resources: 34 | # resources :products do 35 | # resources :comments, :sales 36 | # resource :seller 37 | # end 38 | 39 | # Example resource route with more complex sub-resources: 40 | # resources :products do 41 | # resources :comments 42 | # resources :sales do 43 | # get 'recent', on: :collection 44 | # end 45 | # end 46 | 47 | # Example resource route with concerns: 48 | # concern :toggleable do 49 | # post 'toggle' 50 | # end 51 | # resources :posts, concerns: :toggleable 52 | # resources :photos, concerns: :toggleable 53 | 54 | # Example resource route within a namespace: 55 | # namespace :admin do 56 | # # Directs /admin/products/* to Admin::ProductsController 57 | # # (app/controllers/admin/products_controller.rb) 58 | # resources :products 59 | # end 60 | end 61 | -------------------------------------------------------------------------------- /db/migrate/20140523120948_create_flats.rb: -------------------------------------------------------------------------------- 1 | class CreateFlats < ActiveRecord::Migration 2 | def change 3 | create_table :flats do |t| 4 | t.string :name 5 | t.string :address 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20140523131531_add_latitude_and_longitude_to_flat.rb: -------------------------------------------------------------------------------- 1 | class AddLatitudeAndLongitudeToFlat < ActiveRecord::Migration 2 | def change 3 | add_column :flats, :latitude, :float 4 | add_column :flats, :longitude, :float 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is auto-generated from the current state of the database. Instead 2 | # of editing this file, please use the migrations feature of Active Record to 3 | # incrementally modify your database, and then regenerate this schema definition. 4 | # 5 | # Note that this schema.rb definition is the authoritative source for your 6 | # database schema. If you need to create the application database on another 7 | # system, you should be using db:schema:load, not running all the migrations 8 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations 9 | # you'll amass, the slower it'll run and the greater likelihood for issues). 10 | # 11 | # It's strongly recommended that you check this file into your version control system. 12 | 13 | ActiveRecord::Schema.define(version: 20140523131531) do 14 | 15 | # These are extensions that must be enabled in order to support this database 16 | enable_extension "plpgsql" 17 | 18 | create_table "flats", force: :cascade do |t| 19 | t.string "name" 20 | t.string "address" 21 | t.datetime "created_at" 22 | t.datetime "updated_at" 23 | t.float "latitude" 24 | t.float "longitude" 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | 9 | Flat.destroy_all 10 | Flat.create(name: "Charming Mansion in Montmartre", address: "12, impasse Marie-Blanche, Paris") 11 | Flat.create(name: "Lovely studio Raspail", address: "9, rue d'Odessa, Paris") 12 | Flat.create(name: "Nice Flat. Bonne Nouvelle", address: "18, rue d'Hauteville, Paris") 13 | Flat.create(name: "Awesome House near Buttes-Chaumont", address: "18, rue de l'Atlas, Paris") 14 | 15 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/lib/assets/.keep -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/lib/tasks/.keep -------------------------------------------------------------------------------- /log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/log/.keep -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

The page you were looking for doesn't exist.

54 |

You may have mistyped the address or the page may have moved.

55 |
56 |

If you are the application owner check the logs for more information.

57 | 58 | 59 | -------------------------------------------------------------------------------- /public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

The change you wanted was rejected.

54 |

Maybe you tried to change something you didn't have access to.

55 |
56 |

If you are the application owner check the logs for more information.

57 | 58 | 59 | -------------------------------------------------------------------------------- /public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

We're sorry, but something went wrong.

54 |
55 |

If you are the application owner check the logs for more information.

56 | 57 | 58 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/test/controllers/.keep -------------------------------------------------------------------------------- /test/controllers/flats_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FlatsControllerTest < ActionController::TestCase 4 | setup do 5 | @flat = flats(:one) 6 | end 7 | 8 | test "should get index" do 9 | get :index 10 | assert_response :success 11 | assert_not_nil assigns(:flats) 12 | end 13 | 14 | test "should get new" do 15 | get :new 16 | assert_response :success 17 | end 18 | 19 | test "should create flat" do 20 | assert_difference('Flat.count') do 21 | post :create, flat: { address: @flat.address, name: @flat.name } 22 | end 23 | 24 | assert_redirected_to flat_path(assigns(:flat)) 25 | end 26 | 27 | test "should show flat" do 28 | get :show, id: @flat 29 | assert_response :success 30 | end 31 | 32 | test "should get edit" do 33 | get :edit, id: @flat 34 | assert_response :success 35 | end 36 | 37 | test "should update flat" do 38 | patch :update, id: @flat, flat: { address: @flat.address, name: @flat.name } 39 | assert_redirected_to flat_path(assigns(:flat)) 40 | end 41 | 42 | test "should destroy flat" do 43 | assert_difference('Flat.count', -1) do 44 | delete :destroy, id: @flat 45 | end 46 | 47 | assert_redirected_to flats_path 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /test/fixtures/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/test/fixtures/.keep -------------------------------------------------------------------------------- /test/fixtures/flats.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 | 3 | one: 4 | name: MyString 5 | address: MyString 6 | 7 | two: 8 | name: MyString 9 | address: MyString 10 | -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/test/helpers/.keep -------------------------------------------------------------------------------- /test/helpers/flats_helper_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FlatsHelperTest < ActionView::TestCase 4 | end 5 | -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/test/integration/.keep -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/test/mailers/.keep -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/test/models/.keep -------------------------------------------------------------------------------- /test/models/flat_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FlatTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | ActiveRecord::Migration.check_pending! 7 | 8 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 9 | # 10 | # Note: You'll currently still have to declare fixtures explicitly in integration tests 11 | # -- they do not yet inherit this setting 12 | fixtures :all 13 | 14 | # Add more helper methods to be used by all tests here... 15 | end 16 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/vendor/assets/javascripts/.keep -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewagon/rails-google-maps/b43b8ba4dfa938f963ad38410e730682fadff638/vendor/assets/stylesheets/.keep --------------------------------------------------------------------------------