# class KeysController

### Public Instance Methods

create() click to toggle source

    # File app/controllers/keys_controller.rb, line 19
    def create
      @key = current_user.keys.new(params[:key])
      @key.save

      respond_with(@key)
    end

destroy() click to toggle source

    # 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() click to toggle source

    # File app/controllers/keys_controller.rb, line 5
    def index
      @keys = current_user.keys.all
    end

new() click to toggle source

    # File app/controllers/keys_controller.rb, line 13
    def new
      @key = current_user.keys.new

      respond_with(@key)
    end

show() click to toggle source

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