discourse/app/controllers/badges_controller.rb
Vikhyat Korrapati 3136217fc1 Add badge page.
2014-04-17 01:57:57 +05:30

13 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