Browse Source

Stub out /settings.

old-ruby
Ben Kurtovic 9 years ago
parent
commit
e1eb40710e
4 changed files with 22 additions and 10 deletions
  1. +6
    -0
      app/controllers/users_controller.rb
  2. +1
    -0
      app/views/shared/_header.html.erb
  3. +3
    -0
      app/views/users/settings.html.erb
  4. +12
    -10
      config/routes.rb

+ 6
- 0
app/controllers/users_controller.rb View File

@@ -47,4 +47,10 @@ class UsersController < ApplicationController
# do user reset logic
end
end

def settings
if request.post?
# do settings save logic
end
end
end

+ 1
- 0
app/views/shared/_header.html.erb View File

@@ -9,6 +9,7 @@
<ul>
<% if @user %>
<li><%= @user.name %> [<%= Calefaction::EVE.corp_ticker @user.corp_id %>]</li>
<li><%= link_to 'Settings', controller: 'users', action: 'settings' %></li>
<% if @user.admin? %>
<li><%= link_to 'Admin', controller: 'admin', action: 'index' %></li>
<% end %>


+ 3
- 0
app/views/users/settings.html.erb View File

@@ -0,0 +1,3 @@
<% provide(:title, 'Settings') %>

<h1>Account Settings</h1>

+ 12
- 10
config/routes.rb View File

@@ -1,17 +1,19 @@
Rails.application.routes.draw do
root 'tools#index'

get '/signup' => 'users#signup'
post '/signup' => 'users#signup'
get '/login' => 'users#login'
post '/login' => 'users#login'
get '/logout' => 'users#logout'
post '/logout' => 'users#logout'
get '/reset' => 'users#reset'
post '/reset' => 'users#reset'
get '/signup' => 'users#signup'
post '/signup' => 'users#signup'
get '/login' => 'users#login'
post '/login' => 'users#login'
get '/logout' => 'users#logout'
post '/logout' => 'users#logout'
get '/reset' => 'users#reset'
post '/reset' => 'users#reset'
get '/settings' => 'users#settings'
post '/settings' => 'users#settings'

get '/admin' => 'admin#index'
post '/admin' => 'admin#update'
get '/admin' => 'admin#index'
post '/admin' => 'admin#update'

# routes for each tool go here, e.g.:
# get 'tools#campaigns'


Loading…
Cancel
Save