Created
March 8, 2013 03:54
-
-
Save braidn/5114104 to your computer and use it in GitHub Desktop.
Controller Compare
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 CompletelyFuckingCustomController < ApplicationController | |
def index | |
@completelyFuckingAwesome = CompletelyFuckingCustom.all | |
end | |
def show | |
@completelyFuckingAwesome = CompletelyFuckingCustom.find(params[:id]) | |
end | |
def new | |
@completelyFuckingAwesome = CompletelyFuckingCustom.new | |
end | |
def edit | |
@completelyFuckingAwesome = CompletelyFuckingCustom.find(params[:id]) | |
end | |
def create | |
@completelyFuckingAwesome = CompletelyFuckingCustom.new(params[:completely_fucking_custom]) | |
if @completelyFuckingAwesome.save? | |
redirect_to @completelyFuckingAwesome, notice: 'YOU DID IT' | |
else | |
render 'new' | |
end | |
end | |
def update | |
@completelyFuckingAwesome = CompletelyFuckingCustom.find(params[:id]) | |
if @completelyFuckingAwesome.update_attributes(params[:completely_fucking_custom]) | |
redirect_to @completelyFuckingAwesome, notice: 'YOU DID IT... again' | |
else | |
render 'edit' | |
end | |
end | |
def destroy | |
@completelyFuckingAwesome = find(params[:id]) | |
@completelyFuckingAwesome.destroy | |
redirect_to completely_fucking_customs_url | |
end | |
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 NotFuckingCustomsController < ApplicationController | |
def index | |
@not_fucking_customs = NotFuckingCustom.all | |
end | |
def show | |
@not_fucking_custom = NotFuckingCustom.find(params[:id]) | |
end | |
def new | |
@not_fucking_custom = NotFuckingCustom.new | |
end | |
def edit | |
@not_fucking_custom = NotFuckingCustom.find(params[:id]) | |
end | |
def create | |
@not_fucking_custom = NotFuckingCustom.new(params[:not_fucking_custom]) | |
if @not_fucking_custom.save | |
redirect_to @not_fucking_custom, notice: 'Not fucking custom was successfully created.' | |
else | |
render action: "new" | |
end | |
end | |
def update | |
@not_fucking_custom = NotFuckingCustom.find(params[:id]) | |
if @not_fucking_custom.update_attributes(params[:not_fucking_custom]) | |
redirect_to @not_fucking_custom, notice: 'Not fucking custom was successfully updated.' | |
else | |
render action: "edit" | |
end | |
end | |
def destroy | |
@not_fucking_custom = NotFuckingCustom.find(params[:id]) | |
@not_fucking_custom.destroy | |
redirect_to not_fucking_customs_url | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment