Skip to content

Commit

Permalink
Replace cities#index with cities#forbes_index
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehul Kar committed Jun 6, 2015
1 parent 02d943e commit 92489f0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 51 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@import "static/*";
@import "cities/*";

.sessions.new, .jfdi_signup, .forbes_index, .forbes_show {
.sessions.new, .jfdi_signup, .cities.index, .forbes_show {
@extend .light-background;
}

Expand Down
17 changes: 2 additions & 15 deletions app/controllers/cities_controller.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
class CitiesController < ApplicationController
before_action :set_city, except: [:index, :new, :forbes_index, :forbes_new, :forbes_create]
before_action :set_city, except: [:index, :new, :index, :forbes_new, :forbes_create]
before_action :authenticate_user!, :authorized?, only: [:new, :create, :edit, :update, :destroy]
before_action :away_ye_waitlisted, except: [:forbes_index, :forbes_show, :forbes_new, :forbes_suggest, :forbes_create, :forbes_set_city]
before_action :away_ye_waitlisted, except: [:index, :forbes_show, :forbes_new, :forbes_suggest, :forbes_create, :forbes_set_city]

# GET /cities
# GET /cities.json
def index
if can? :manage, City
@cities = City.all
respond_to do |format|
format.html { render layout: !request.xhr? }
format.json { render json: @cities }
end
else
redirect_to root_path+"#cities"
end
end

def forbes_index
use_new_styles
end

Expand Down
File renamed without changes.
34 changes: 0 additions & 34 deletions app/views/cities/index.html.haml

This file was deleted.

1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
end
end

get '/cities' => 'cities#forbes_index'
resources :cities do
collection do
get '/suggest' => 'cities#forbes_new', as: :suggest
Expand Down

0 comments on commit 92489f0

Please sign in to comment.