Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PostsController < ApplicationController
- layout :determine
- def index
- end
- def new
- end
- def admin
- render :index
- end
- private
- def determine
- return "special" if params[:special].to_i == 1
- return case action_name
- when "new"
- "posts"
- when "admin"
- "admin/main"
- else
- "application"
- end
- end
- end
Add Comment
Please, Sign In to add comment