Skip to content

Instantly share code, notes, and snippets.

Samson Akanbi samseen

Block or report user

Report or block samseen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View citiesinlagos.json
["Maryland","Mende","Alausa","Oregun","Ogba Aguda","Ojodu","Isheri Oke","Isheri Ofin","Olowoira","Ifako Agege","Iju Water Works","Iju Isaga","Oworosoki","Oworosoki L and K","Abule Okuta","Shomolu Central","Anthony","Obanikoro","Shomolu Pedro","Gbagada","Atunrase Estate Gbagada","Ojota","Ogudu","Ketu","Alapere Ketu","Ketu Orisigun","Ikosi","Ketu Mile 12","Magodo","Sangisa","Oremeji Ifako","Onipanu","Ilupeju","Fadeyi","Palmgrove","Jibowu","Mushin","Lawanson","Idi Araba","Idi Oro","Oshodi","Shogunle","Isolo","Ajao Estate","Ilasamaja","Isaga Tedo","Ejigbo Orinle Owo","Bungalow Estate","Oke Afa Jakande","Ikotun","Egbe","Agodo","Ijegun","Isheri Osun","Igando","Balogun","Egan","Akesan","Badore","Abarenji","Ijedodo","Ijegemo","Idumu","Egbeda","Ikeja","G.R.A","Murtala Muhammed Airport","Dopemu","Oya Estate","Alimosho","Abule Egba","Ipaja","Allen","Opebi","Ikeja Oba Akran","Agege","Oko Oba Agege","Olota","Captain","Akintan","Jankara","Ojokoro","Alagbado","Ahmadiya","Suberu Oje","Meiran","Alakuko","Ijaye","Agbelekale","
View application_controller.rb
class ApplicationController < ActionController::Base
before_filter :authorize
protected
def authorize
unless User.find_by_id(session[:user_id])
redirect_to login_url, notice: "Please log in"
end
View application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>Pragprog Books Online Store</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body class='<%= controller.controller_name %>'>
@samseen
samseen / routes.rb
Created Sep 26, 2016
In the users_controller.rb -->{I intentionally commented out line 56 because as that reduced the error. I added Line 57 as a work around.}
View routes.rb
Rails.application.routes.draw do
#resources :users
root 'welcome#home'
get 'about', to: 'welcome#about'
resources :articles
get 'signup', to: 'users#new'
resources :users, except: [:new]
You can’t perform that action at this time.