changed the filtering and some other stuff
This commit is contained in:
parent
142eecf6fa
commit
f23115bde5
|
@ -1,7 +1,7 @@
|
||||||
class AnnouncementsController < ApplicationController
|
class AnnouncementsController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
announcements = Bulletin.all
|
announcements = Bulletin.filter_by_categories
|
||||||
anns = announcements.collect do |a|
|
anns = announcements.collect do |a|
|
||||||
{
|
{
|
||||||
"title" => a.title,
|
"title" => a.title,
|
||||||
|
@ -34,7 +34,7 @@ class AnnouncementsController < ApplicationController
|
||||||
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
params = OrbitHelper.get_params
|
params = OrbitHelper.params
|
||||||
announcement = Bulletin.find_by_param(params[:uid])
|
announcement = Bulletin.find_by_param(params[:uid])
|
||||||
{
|
{
|
||||||
"title" => announcement.title,
|
"title" => announcement.title,
|
||||||
|
|
|
@ -12,4 +12,5 @@ class Bulletin
|
||||||
def self.find_by_param(input)
|
def self.find_by_param(input)
|
||||||
self.find_by(uid: input)
|
self.find_by(uid: input)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue