mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
12 lines
299 B
Ruby
12 lines
299 B
Ruby
class BadgesController < ApplicationController
|
|
def index
|
|
badges = Badge.all.to_a
|
|
render_serialized(badges, BadgeSerializer, root: "badges")
|
|
end
|
|
|
|
def show
|
|
params.require(:id)
|
|
badge = Badge.find(params[:id])
|
|
render_serialized(badge, BadgeSerializer, root: "badge")
|
|
end
|
|
end
|