Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class KarretlinksController < ApplicationController
- before_filter :authenticate , :except => [:show, :new, :newlink, :edit, :create, :update, :destroy]
- def authenticate
- authenticate_or_request_with_http_basic do |username, password|
- username == "admin" && password == "weareninja"
- end
- end
- ...
- def display
- @karretlinks = Karretlink.paginate(:page => params[:page], :per_page => 10)
- # respond_to do |format|
- # format.html # index.html.erb
- # format.json { render json: @karretlinks }
- # end
- end
- ...
- def like
- @user_karet = UserKaret.new
- @user_karet.user_id = current_user.id
- # @user_karet.karet_id = ???
- @user_karet.save
- end
- ...
- end
Add Comment
Please, Sign In to add comment