Class: MailAdminController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- MailAdminController
- Defined in:
- app/controllers/mail_admin_controller.rb
Instance Method Summary collapse
- #edit_admin_message ⇒ Object
- #list_admin_messages ⇒ Object
- #new_admin_message ⇒ Object
- #remove_admin_message ⇒ Object
Instance Method Details
#edit_admin_message ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/mail_admin_controller.rb', line 7 def if request.post? @adminmessage = AdminMessage.find(params[:id]) if @adminmessage.update_attributes(params[:adminmessage]) if @adminmessage.save flash[:notice] = 'The admin message was successfully edited.' session[:user] = User.find session[:user].id redirect_to :controller => 'mailinglist', :action => 'show', :id => params[:id] end end else @adminmessage = AdminMessage.find(params[:id]) end end |
#list_admin_messages ⇒ Object
2 3 4 5 |
# File 'app/controllers/mail_admin_controller.rb', line 2 def @mailinglist = Mailinglist.find_by_id(params[:id]) @adminmessages = AdminMessage.find(@mailinglist., @mailinglist., @mailinglist.) end |
#new_admin_message ⇒ Object
24 25 26 |
# File 'app/controllers/mail_admin_controller.rb', line 24 def end |
#remove_admin_message ⇒ Object
28 29 |
# File 'app/controllers/mail_admin_controller.rb', line 28 def end |