Methods
C
D
I
N
S
Instance Public methods
create()
# File app/controllers/keys_controller.rb, line 19
def create
  @key = current_user.keys.new(params[:key])
  @key.save

  respond_with(@key)
end
destroy()
# File app/controllers/keys_controller.rb, line 26
def destroy
  @key = current_user.keys.find(params[:id])
  @key.destroy

  respond_to do |format|
    format.html { redirect_to keys_url }
    format.js { render nothing: true }
  end
end
index()
# File app/controllers/keys_controller.rb, line 5
def index
  @keys = current_user.keys.all
end
new()
# File app/controllers/keys_controller.rb, line 13
def new
  @key = current_user.keys.new

  respond_with(@key)
end
show()
# File app/controllers/keys_controller.rb, line 9
def show
  @key = current_user.keys.find(params[:id])
end