Skip to content

Instantly share code, notes, and snippets.

@halogenandtoast
Created December 1, 2016 15:04
Show Gist options
  • Select an option

  • Save halogenandtoast/eff65d5a9df51efadf02fac8ded5a8de to your computer and use it in GitHub Desktop.

Select an option

Save halogenandtoast/eff65d5a9df51efadf02fac8ded5a8de to your computer and use it in GitHub Desktop.
class PostsController < ApplicationController
before_action :require_login
def show
render plain: "HERE"
end
end
sv:
routes:
login: logga-in
Rails.application.routes.draw do
localized do
resource :posts
resource :session, only: [:create, :destroy]
resources :users, only: [:new, :create]
get "login" => "sessions#new"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment