Last active
August 29, 2015 14:00
-
-
Save universal/11368414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<% @users.each do |user| %> | |
<li> | |
<%= link_to("1. Letter of Representation", letter_of_user_path(user) %> | |
</li> | |
<% end %> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gwhite::Application.routes.draw do | |
root :to => 'welcome#index' | |
resources :welcome do | |
member do | |
post :activate | |
get :lolrep | |
end | |
end | |
devise_for :users, :controllers => { :registrations => "registrations" } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WelcomeController < ApplicationController | |
def index | |
@users = User.all | |
end | |
def show | |
@user = User.find(params[:id]) | |
end | |
def new | |
end | |
def create | |
end | |
def edit | |
end | |
def update | |
end | |
def destroy | |
end | |
def activate | |
@user = User.find(params[:id]) | |
if @user.update_attribute(:approved, true) | |
redirect_to root_path | |
else | |
render :new | |
end | |
end | |
def lorep | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment