eBooru/app/controllers/artist_urls_controller.rb

14 lines
450 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
2018-06-05 17:40:55 -04:00
class ArtistUrlsController < ApplicationController
2021-11-20 16:03:59 -05:00
respond_to :json, :html
before_action :member_only, except: [:index]
def index
@artist_urls = ArtistUrl.includes(:artist).search(search_params).paginate(params[:page], limit: params[:limit], search_count: params[:search])
respond_with(@artist_urls) do |format|
format.json { render json: @artist_urls.to_json(include: :artist) }
end
end
2018-06-05 17:40:55 -04:00
end