site

Website's source files.
git clone git://git.ryanmj.xyz/site.git
Log | Files | Refs | LICENSE

posts_controller.rb (744B)


      1 class PostsController < ApplicationController
      2   def index
      3     @posts = Post.where(where: '')
      4   end
      5 
      6   # Blog in /posts/
      7   def blog_index
      8     @posts = Post.where(where: 'posts')
      9   end
     10 
     11   def show
     12     (@post = Post.find_by(where: 'posts', url: params[:url])) or not_found
     13   end
     14 
     15   # Get "rolling" front page items
     16   def front_show
     17     (@post = Post.find_by(where: '', url: params[:url])) or not_found
     18     render 'show'
     19   end
     20 
     21   # Secret Blog in /esoteric/
     22   def esoteric
     23     #TODO
     24   end
     25 
     26   def esoteric_show
     27     (@post = Post.find_by(where: 'esoteric', url: params[:url])) or not_found
     28     render 'show'
     29   end
     30 
     31   def blerbs
     32     render 'blerbs'
     33   end
     34 
     35   def links
     36     (@post = Post.find_by(where: 'link')) or not_found
     37     render 'show'
     38   end
     39 end