changed the filtering and some other stuff

This commit is contained in:
Harry Bomrah 2014-04-21 15:39:13 +08:00
parent 142eecf6fa
commit f23115bde5
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
class AnnouncementsController < ApplicationController
def index
announcements = Bulletin.all
announcements = Bulletin.filter_by_categories
anns = announcements.collect do |a|
{
"title" => a.title,
@ -34,7 +34,7 @@ class AnnouncementsController < ApplicationController
def show
params = OrbitHelper.get_params
params = OrbitHelper.params
announcement = Bulletin.find_by_param(params[:uid])
{
"title" => announcement.title,

View File

@ -12,4 +12,5 @@ class Bulletin
def self.find_by_param(input)
self.find_by(uid: input)
end
end