Skip to content

Is there a way to pass other attributes to the actsasmessagable message? #6

Closed
angelacode opened this Issue Jun 29, 2011 · 1 comment

2 participants

@angelacode

My messages aren't just straight messages, I also pass along an account name and sometimes build as a nested-attribute a contact.

Is that possible to do?

@LTe
Owner
LTe commented Jul 2, 2011

You can create migration and add custom fields to messages table.

rails g migration add_custom_attribute_to_messages custom_attribute:string

After create message you can change attribute

@message = @alice.send_message(@bob, :body => "Hi there Bob!")
@message.update_attribute(:custom_attribute, "custom value")
@LTe LTe closed this Jul 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.