Ruby on Rails
Sunday, September 2, 2018
Trying to upgrade the code below
-- class Mailboxer::Notification < ActiveRecord::Base
...
attr_accessible :body, :subject, :global, :expires if Mailboxer.protected_attributes?
There's no message model The messages are the receipts They belong to notifications which belong to conversations Although there's no message model there's a messages controller which had no strong params so I put them there and commented out attr_accessible like this
def message_params
params.require(:message).permit( :body, :subject, :global, :expires)
end
but that didn't fix the problem that the message object comes up nil in conversation show view
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/742dcdd1-ab00-4382-ad2b-01d61de5f7e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment