• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/8

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

8 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)
params
Rails uses to send a new query parameter in the URL.
Ex: @tweet = Tweet.create(:status => params[:status])
respond_to
can set formatting to render in XML or JSON.
respond_to do |format|
format.html
format.xml { render : xml => @tweet }
session
Works like a per user hash
session[:zombie_id] != @tweet.zombie_id
flash[:notice] = "Sorry, you can't edit this tweet"
flash
Sends messages to the user
flash[:notice]
redirect <path>
Redirects the request. For example, if somebody does not pass validation.
redirect_to(tweets_path,
:notice => "Sorry, you can't edit this tweet")
before_filter
Use to create methods that can be applied to multiple views. For example, to check authorization for edit, update and destroy.
before_filter :get_tweet, :only => [:edit, :update, :destroy]

def get_tweet
@tweet = Tweet.find(params[:id])
end
show
In the controller

def show
@tweet = Tweet.find(params[:id])
render :action => 'status'
end
In the controller

def show
@tweet = Tweet.find(params[:id])
render :action => 'status'
end
render
def show
render :action => :show
end
def show
render :action => :show
end