1 class MessageController < ApplicationController
3 # before_filter :authorize
4 before_filter :authorize_web
5 before_filter :require_user
9 body = params[:message][:body]
10 title = params[:message][:title]
14 message.to_user_id = User.find_by_display_name(params[:display_name]).id
15 message.from_user_id = @user.id
16 message.sent_on = Time.now
18 flash[:notice] = 'Message sent'
20 @message.errors.add("Sending message failed")