├── log
└── .keep
├── tmp
└── .keep
├── vendor
└── .keep
├── lib
├── assets
│ └── .keep
└── tasks
│ └── .keep
├── test
├── helpers
│ └── .keep
├── mailers
│ └── .keep
├── models
│ ├── .keep
│ ├── photo_test.rb
│ ├── user_test.rb
│ ├── business_test.rb
│ └── review_test.rb
├── system
│ └── .keep
├── controllers
│ ├── .keep
│ ├── api
│ │ ├── photos_controller_test.rb
│ │ └── reviews_controller_test.rb
│ └── businesses_controller_test.rb
├── fixtures
│ ├── .keep
│ ├── files
│ │ └── .keep
│ ├── photos.yml
│ ├── reviews.yml
│ ├── users.yml
│ └── businesses.yml
├── integration
│ └── .keep
├── application_system_test_case.rb
└── test_helper.rb
├── app
├── assets
│ ├── images
│ │ ├── .keep
│ │ ├── mag.png
│ │ ├── default.jpg
│ │ ├── favicon.ico
│ │ ├── default_biz.png
│ │ ├── logo_and_bar.png
│ │ ├── one_star_review.png
│ │ ├── transpBlack75.png
│ │ ├── transpBlack90.png
│ │ ├── two_star_review.png
│ │ ├── welcome_image.png
│ │ ├── evan-kirby-71617.jpg
│ │ ├── five_star_review.png
│ │ ├── footer_cityscape.png
│ │ ├── four_star_review.png
│ │ ├── neonbrand-231219.jpg
│ │ ├── three_star_review.png
│ │ ├── toa-heftiba-84799.jpg
│ │ ├── arek-adeoye-221899.jpg
│ │ ├── sebastian-lp-158732.jpg
│ │ ├── sharon-chen-352895.jpg
│ │ ├── austin-moncada-186841.jpg
│ │ ├── david-nuescheler-140505.jpg
│ │ ├── matthew-hamilton-160833.jpg
│ │ ├── french.svg
│ │ └── italy.svg
│ ├── javascripts
│ │ ├── channels
│ │ │ └── .keep
│ │ ├── api
│ │ │ ├── photos.coffee
│ │ │ └── reviews.coffee
│ │ ├── businesses.coffee
│ │ ├── cable.js
│ │ └── application.js
│ ├── stylesheets
│ │ ├── main.scss
│ │ ├── api
│ │ │ ├── photos.scss
│ │ │ └── reviews.scss
│ │ ├── map.scss
│ │ ├── application.css
│ │ ├── biz_landing_index.scss
│ │ ├── css_reset.css
│ │ ├── footer.scss
│ │ ├── filter_search.scss
│ │ ├── commments.scss
│ │ ├── photo_show.scss
│ │ ├── photo-index.scss
│ │ ├── businesses.scss
│ │ ├── navbar.scss
│ │ ├── photo_upload.scss
│ │ ├── session_form.scss
│ │ ├── review_form.scss
│ │ └── business_show.scss
│ └── config
│ │ └── manifest.js
├── models
│ ├── concerns
│ │ └── .keep
│ ├── application_record.rb
│ ├── photo.rb
│ ├── review.rb
│ ├── user.rb
│ └── business.rb
├── controllers
│ ├── concerns
│ │ └── .keep
│ ├── static_pages_controller.rb
│ ├── api
│ │ ├── users_controller.rb
│ │ ├── sessions_controller.rb
│ │ ├── photos_controller.rb
│ │ ├── reviews_controller.rb
│ │ └── businesses_controller.rb
│ └── application_controller.rb
├── views
│ ├── layouts
│ │ ├── mailer.text.erb
│ │ ├── mailer.html.erb
│ │ └── application.html.erb
│ ├── api
│ │ ├── photos
│ │ │ ├── show.json.jbuilder
│ │ │ ├── index.json.jbuilder
│ │ │ └── _photo.json.jbuilder
│ │ ├── reviews
│ │ │ ├── show.json.jbuilder
│ │ │ ├── _review.json.jbuilder
│ │ │ └── index.json.jbuilder
│ │ ├── users
│ │ │ ├── show.json.jbuilder
│ │ │ └── _user.json.jbuilder
│ │ └── businesses
│ │ │ ├── reviewers.json.jbuilder
│ │ │ ├── _business.json.jbuilder
│ │ │ ├── index.json.jbuilder
│ │ │ └── show.json.jbuilder
│ └── static_pages
│ │ └── root.html.erb
├── helpers
│ ├── businesses_helper.rb
│ ├── api
│ │ ├── photos_helper.rb
│ │ └── reviews_helper.rb
│ └── application_helper.rb
├── jobs
│ └── application_job.rb
├── channels
│ └── application_cable
│ │ ├── channel.rb
│ │ └── connection.rb
└── mailers
│ └── application_mailer.rb
├── frontend
├── components
│ ├── photos
│ │ ├── photo_biz_show_index.jsx
│ │ ├── photo_index_item.jsx
│ │ ├── photos_container.jsx
│ │ ├── photo_upload_container.jsx
│ │ ├── photo_show_container.jsx
│ │ ├── photo_show.jsx
│ │ └── photo_upload.jsx
│ ├── root.jsx
│ ├── business
│ │ ├── business_landing_container.jsx
│ │ ├── biz_landing_index.jsx
│ │ ├── biz_show_map.jsx
│ │ ├── search_container.jsx
│ │ ├── business_show_container.jsx
│ │ ├── search.jsx
│ │ ├── business_index.jsx
│ │ ├── business_map.jsx
│ │ └── biz_landing_index_item.jsx
│ ├── NavBar
│ │ ├── NavBar_container.jsx
│ │ └── NavBar.jsx
│ ├── search_form_container.jsx
│ ├── landing
│ │ ├── landing_container.jsx
│ │ └── landing.jsx
│ ├── reviews
│ │ ├── review_index.jsx
│ │ ├── reviews_container.jsx
│ │ ├── review_form_container.jsx
│ │ └── review_index_item.jsx
│ ├── session
│ │ └── session_form_container.jsx
│ ├── App.jsx
│ └── footer.jsx
├── util
│ ├── user_api_util.js
│ ├── session_api_util.js
│ ├── business_api_util.js
│ ├── review_api_util.js
│ ├── photo_api_util.js
│ ├── route_util.jsx
│ ├── biz_show_marker_manager.js
│ └── marker_manager.js
├── reducers
│ ├── errors_reducer.js
│ ├── page_reducer.js
│ ├── session_reducer.js
│ ├── filter_reducer.js
│ ├── session_errors_reducer.js
│ ├── business_reducer.js
│ ├── user_reducer.js
│ ├── photo_reducer.js
│ ├── root_reducer.js
│ └── review_reducer.js
├── actions
│ ├── user_actions.js
│ ├── filter_actions.js
│ ├── business_actions.js
│ ├── session_actions.js
│ ├── photo_actions.js
│ └── review_actions.js
├── store
│ └── store.js
└── entry.jsx
├── bin
├── bundle
├── rake
├── rails
├── yarn
├── spring
├── update
└── setup
├── config
├── spring.rb
├── boot.rb
├── environment.rb
├── initializers
│ ├── mime_types.rb
│ ├── filter_parameter_logging.rb
│ ├── application_controller_renderer.rb
│ ├── cookies_serializer.rb
│ ├── backtrace_silencers.rb
│ ├── wrap_parameters.rb
│ ├── assets.rb
│ └── inflections.rb
├── cable.yml
├── routes.rb
├── locales
│ └── en.yml
├── application.rb
├── secrets.yml
├── environments
│ ├── test.rb
│ ├── development.rb
│ └── production.rb
├── puma.rb
└── database.yml
├── config.ru
├── db
├── migrate
│ ├── 20171026192246_businesses.rb
│ ├── 20171029203202_remove_column_from_users.rb
│ ├── 20171030184731_fix_column_name.rb
│ ├── 20171030183525_add_column_to_businesses.rb
│ ├── 20171101221825_add_columns_to_business.rb
│ ├── 20171024025530_create_photos.rb
│ ├── 20171029203759_add_attachment_image_to_users.rb
│ ├── 20171029203836_add_attachment_image_to_photos.rb
│ ├── 20171030182944_add_features.rb
│ ├── 20171026190218_add_attachment_image_to_businesses.rb
│ ├── 20171102183657_remove_columns_from_businesses.rb
│ ├── 20171024025658_create_reviews.rb
│ ├── 20171024013750_create_users.rb
│ └── 20171024025355_create_businesses.rb
└── schema.rb
├── Rakefile
├── .gitignore
├── webpack.config.js
├── package.json
├── Gemfile
└── README.md
/log/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tmp/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/vendor/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/helpers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/system/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/controllers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/integration/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/files/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/assets/javascripts/channels/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/frontend/components/photos/photo_biz_show_index.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/main.scss:
--------------------------------------------------------------------------------
1 |
2 | @import "font-awesome";
3 |
--------------------------------------------------------------------------------
/app/helpers/businesses_helper.rb:
--------------------------------------------------------------------------------
1 | module BusinessesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/api/photos_helper.rb:
--------------------------------------------------------------------------------
1 | module Api::PhotosHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/api/reviews_helper.rb:
--------------------------------------------------------------------------------
1 | module Api::ReviewsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 | end
3 |
--------------------------------------------------------------------------------
/app/views/api/photos/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! 'photo', photo: @photo
2 |
--------------------------------------------------------------------------------
/app/views/api/reviews/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! 'review', review: @review
2 |
--------------------------------------------------------------------------------
/app/views/api/users/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "api/users/user", user: @user
2 |
--------------------------------------------------------------------------------
/app/assets/images/mag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/mag.png
--------------------------------------------------------------------------------
/app/assets/images/default.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/default.jpg
--------------------------------------------------------------------------------
/app/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/favicon.ico
--------------------------------------------------------------------------------
/app/assets/images/default_biz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/default_biz.png
--------------------------------------------------------------------------------
/app/assets/images/logo_and_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/logo_and_bar.png
--------------------------------------------------------------------------------
/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | self.abstract_class = true
3 | end
4 |
--------------------------------------------------------------------------------
/app/assets/images/one_star_review.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/one_star_review.png
--------------------------------------------------------------------------------
/app/assets/images/transpBlack75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/transpBlack75.png
--------------------------------------------------------------------------------
/app/assets/images/transpBlack90.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/transpBlack90.png
--------------------------------------------------------------------------------
/app/assets/images/two_star_review.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/two_star_review.png
--------------------------------------------------------------------------------
/app/assets/images/welcome_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/welcome_image.png
--------------------------------------------------------------------------------
/app/assets/images/evan-kirby-71617.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/evan-kirby-71617.jpg
--------------------------------------------------------------------------------
/app/assets/images/five_star_review.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/five_star_review.png
--------------------------------------------------------------------------------
/app/assets/images/footer_cityscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/footer_cityscape.png
--------------------------------------------------------------------------------
/app/assets/images/four_star_review.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/four_star_review.png
--------------------------------------------------------------------------------
/app/assets/images/neonbrand-231219.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/neonbrand-231219.jpg
--------------------------------------------------------------------------------
/app/assets/images/three_star_review.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/three_star_review.png
--------------------------------------------------------------------------------
/app/assets/images/toa-heftiba-84799.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/toa-heftiba-84799.jpg
--------------------------------------------------------------------------------
/app/assets/images/arek-adeoye-221899.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/arek-adeoye-221899.jpg
--------------------------------------------------------------------------------
/app/assets/images/sebastian-lp-158732.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/sebastian-lp-158732.jpg
--------------------------------------------------------------------------------
/app/assets/images/sharon-chen-352895.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/sharon-chen-352895.jpg
--------------------------------------------------------------------------------
/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Channel < ActionCable::Channel::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/static_pages_controller.rb:
--------------------------------------------------------------------------------
1 |
2 | class StaticPagesController < ApplicationController
3 | def root
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../javascripts .js
3 | //= link_directory ../stylesheets .css
4 |
--------------------------------------------------------------------------------
/app/assets/images/austin-moncada-186841.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/austin-moncada-186841.jpg
--------------------------------------------------------------------------------
/app/assets/images/david-nuescheler-140505.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/david-nuescheler-140505.jpg
--------------------------------------------------------------------------------
/app/assets/images/matthew-hamilton-160833.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coreyladovsky/help/HEAD/app/assets/images/matthew-hamilton-160833.jpg
--------------------------------------------------------------------------------
/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Connection < ActionCable::Connection::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: 'from@example.com'
3 | layout 'mailer'
4 | end
5 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w(
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ).each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/frontend/util/user_api_util.js:
--------------------------------------------------------------------------------
1 | export const fetchUser = userId =>
2 | $.ajax({
3 | method: "GET",
4 | url: `api/users/${userId}`
5 | });
6 |
--------------------------------------------------------------------------------
/app/views/api/photos/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | @photos.each do |photo|
2 | json.set! photo.id do
3 | json.partial! "photo", photo: photo
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/api/reviews/_review.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! review, :id, :body, :user_id, :rating, :price_range,
2 | :noise_level, :delivery, :created_at
3 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/app/views/api/reviews/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | @reviews.each do |review|
2 | json.set! review.id do
3 | json.partial! "review", review: review
4 | end
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/test/models/photo_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class PhotoTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/user_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UserTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/app/views/api/users/_user.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! user, :id, :email, :image, :first_name, :last_name, :zip_code
2 |
3 | json.image asset_path(user.image.url(:thumb))
4 |
--------------------------------------------------------------------------------
/db/migrate/20171026192246_businesses.rb:
--------------------------------------------------------------------------------
1 | class Businesses < ActiveRecord::Migration[5.1]
2 | def change
3 | remove_column :businesses, :profile_pic
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/business_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BusinessTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/review_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ReviewTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20171029203202_remove_column_from_users.rb:
--------------------------------------------------------------------------------
1 | class RemoveColumnFromUsers < ActiveRecord::Migration[5.1]
2 | def change
3 | remove_column :users, :profile_pic
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20171030184731_fix_column_name.rb:
--------------------------------------------------------------------------------
1 | class FixColumnName < ActiveRecord::Migration[5.1]
2 | def change
3 | rename_column :businesses, :rating_count, :review_count
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/api/businesses/reviewers.json.jbuilder:
--------------------------------------------------------------------------------
1 | @users.each do |user|
2 | json.set! user.id do
3 | json.extract! user, :id, :email, :image, :first_name, :last_name, :zip_code
4 |
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/db/migrate/20171030183525_add_column_to_businesses.rb:
--------------------------------------------------------------------------------
1 | class AddColumnToBusinesses < ActiveRecord::Migration[5.1]
2 | def change
3 | add_column :businesses, :rating_count, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/test/application_system_test_case.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5 | end
6 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: async
6 |
7 | production:
8 | adapter: redis
9 | url: redis://localhost:6379/1
10 | channel_prefix: Help_production
11 |
--------------------------------------------------------------------------------
/test/controllers/api/photos_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class Api::PhotosControllerTest < ActionDispatch::IntegrationTest
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/controllers/api/reviews_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class Api::ReviewsControllerTest < ActionDispatch::IntegrationTest
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/app/views/api/photos/_photo.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! photo, :id, :user_id, :business_id, :image
2 |
3 | json.image asset_path(photo.image.url(:croppable))
4 | json.image_medium asset_path(photo.image.url(:croppable))
5 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/api/photos.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the api/photos controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/test/fixtures/photos.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | user_id: 1
5 | business_id: 1
6 |
7 | two:
8 | user_id: 1
9 | business_id: 1
10 |
--------------------------------------------------------------------------------
/db/migrate/20171101221825_add_columns_to_business.rb:
--------------------------------------------------------------------------------
1 | class AddColumnsToBusiness < ActiveRecord::Migration[5.1]
2 | def change
3 | add_column :businesses, :lat, :float
4 | add_column :businesses, :lng, :float
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_relative 'config/application'
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/app/assets/javascripts/api/photos.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/businesses.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/api/reviews.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path('../spring', __FILE__)
4 | rescue LoadError => e
5 | raise unless e.message.include?('spring')
6 | end
7 | require_relative '../config/boot'
8 | require 'rake'
9 | Rake.application.run
10 |
--------------------------------------------------------------------------------
/frontend/reducers/errors_reducer.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux";
2 | import SessionErrorsReducer from "./session_errors_reducer";
3 |
4 | const ErrorsReducer = combineReducers({
5 | session: SessionErrorsReducer
6 | });
7 |
8 | export default ErrorsReducer;
9 |
--------------------------------------------------------------------------------
/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/db/migrate/20171024025530_create_photos.rb:
--------------------------------------------------------------------------------
1 | class CreatePhotos < ActiveRecord::Migration[5.1]
2 | def change
3 | create_table :photos do |t|
4 | t.integer :user_id, null: false
5 | t.integer :business_id, null: false
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/api/reviews.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the api/reviews controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 | .review-items-ul {
5 | display: flex;
6 | flex-direction: column-reverse;
7 | }
8 |
--------------------------------------------------------------------------------
/app/models/photo.rb:
--------------------------------------------------------------------------------
1 | class Photo < ApplicationRecord
2 | belongs_to :user
3 | belongs_to :business
4 |
5 |
6 | has_attached_file :image, styles: { thumb: '100x100', croppable: '600x600>', big: '1000x1000>' }
7 | validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/app/views/static_pages/root.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |