Does anyone know a good personal pearl for rails 3.2?

I spent day and day figuring out how to create a good messaging system between a registered user through development.

But in all cases, these gems are outdated and they do not support rails3.

If you are trying to create a system that includes these features. How are you doing?

  • Registration of the participant (development)
  • personal messaging system (with email program)
+5
source share
2 answers

https://github.com/ging/mailboxer ?

/config/initializer/mailboxer.rb:

Mailboxer.setup do |config|
  config.uses_emails = true  
  config.default_from = "no-reply@youraddress.com"
end

minimum model

class User < ActiveRecord::Base
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable

  acts_as_messageable

  attr_accessible :email, :password, :password_confirmation, :remember_me

  def name
    email
  end

  def mailboxer_email(object)
    email
  end  
end

And, of course, starndard mailer configurations.

+5
source

ActionMailer? ? , PrivateMessage:

class PrivateMessage
  has_one :sender, :class => 'User'
  has_one :recipient, :class => 'User'
end
+3

All Articles