- redirect_to :controller => "users", :action => "login", :referer => request.fullpath
- end
- rescue ActiveRecord::RecordNotFound
- @title = t "messages.no_such_message.title"
- render :action => "no_such_message", :status => :not_found
- end
-
- # Show a message
- def show
- @title = t ".title"
- @message = Message.find(params[:id])
-
- if @message.recipient == current_user || @message.sender == current_user
- @message.message_read = true if @message.recipient == current_user
- @message.save
- else
- flash[:notice] = t ".wrong_user", :user => current_user.display_name
- redirect_to :controller => "users", :action => "login", :referer => request.fullpath