You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for your effort creating the plugin. i have installed has_messages 0.4.1 and state_machine 0.10.4 with rails 2.3.10, and tried to send some message with the following lines. however the system returned with "unitialized constant User::Message". what am i missing? can you show more usage about the syntax to use has_messages? many thanks.
User model
class User < ActiveRecord::Base
has_messages
end
def self.send_msg()
message = User.current_user.messages.build # i want to send a message by the current user
message.to 2 # to user with id = 2. i am not sure this is correct or not.
message.subject = ’Hey!’
message.body = ’Does anyone want to go out tonight?’
message.deliver
end
batterhead
Same here! I, personally, had to use the https://github.com/chengz/has_messages
fork to make it migrate for rails 3, too. Is this intended, or is there another possibility to do so...?
Also, is this rails3 compatible at all, or will it be?
batterhead opened this issue
hi,
thanks for your effort creating the plugin. i have installed has_messages 0.4.1 and state_machine 0.10.4 with rails 2.3.10, and tried to send some message with the following lines. however the system returned with "unitialized constant User::Message". what am i missing? can you show more usage about the syntax to use has_messages? many thanks.
User model
class User < ActiveRecord::Base
has_messages
end
def self.send_msg()
message = User.current_user.messages.build # i want to send a message by the current user
message.to 2 # to user with id = 2. i am not sure this is correct or not.
message.subject = ’Hey!’
message.body = ’Does anyone want to go out tonight?’
message.deliver
end
batterhead
original LH ticket
This ticket has 0 attachment(s).
The text was updated successfully, but these errors were encountered: