Add reroute middleware hack
This commit is contained in:
1 parent
9f1ba2ae66
commit
314f6d5219
14 files changed
+65
-47
No files matched your search
@@ -1,21 +1,24 @@
|
||||
class Admin::AnnouncementsController < ApplicationController
|
||||
|
||||
before_filter :require_entry_name, :only => [:index, :new]
|
||||
|
||||
layout "admin"
|
||||
|
||||
def index
|
||||
@announcements = Announcement.all
|
||||
@announcements = Announcement.find(:all, :conditions => { :entry_name => params[:entry_name] })
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.html
|
||||
format.xml { render :xml => @announcements }
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@announcement = Announcement.new
|
||||
|
||||
@announcement.entry_name = params[:entry_name]
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.htm
|
||||
format.xml { render :xml => @announcement }
|
||||
end
|
||||
end
|
||||
@@ -26,7 +29,7 @@ class Admin::AnnouncementsController < ApplicationController
|
||||
|
||||
def create
|
||||
@announcement = Announcement.new(params[:announcement])
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
if @announcement.save
|
||||
flash[:notice] = 'Announcement was successfully created.'
|
||||
|
||||
Reference in new issue
Block a user