Comments (7)
I don't use ancestry method in this gem. How I can reproduce this issue?
from acts-as-messageable.
Thanks for replying. I just included in my gem file and was attempting to create and send a new message. I see the require ancestry in the following file: https://github.com/LTe/acts-as-messageable/blob/master/lib/acts-as-messageable/message.rb
i don't see how it's being called though. This is what i'm doing in the code:
@to_user =User.find(params[:deliver_to])
puts @to_user.email
@message = current_user.send_message(@to_user, params[:subject], params[:message])
from acts-as-messageable.
Do you have whole backtrace?
from acts-as-messageable.
ruby-1.9.2-p180 :010 > u.send_message(v,"subject 1", "message 1")
NoMethodError: undefined method `ancestry' for #<ActsAsMessageable::Message:0x0000010524fcd8>
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:in `method_missing'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/attribute_methods.rb:46:in `method_missing'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validator.rb:152:in `block in validate'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validator.rb:151:in `each'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validator.rb:151:in `validate'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:314:in `_callback_before_41'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:414:in `_run_validate_callbacks'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations.rb:212:in `run_validations!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations/callbacks.rb:67:in `block in run_validations!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:413:in `_run_validation_callbacks'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations/callbacks.rb:67:in `run_validations!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations.rb:179:in `valid?'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:55:in `valid?'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:75:in `perform_validations'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:49:in `save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:30:in `save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:242:in `block in save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:289:in `block in with_transaction_returning_status'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:204:in `transaction'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:287:in `with_transaction_returning_status'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:242:in `save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:34:in `create!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/acts-as-messageable-0.3.1/lib/acts-as-messageable/acts-as-messageable.rb:71:in `send_message'
from (irb):10
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:44:in `start'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in `start'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:23:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'ruby-1.9.2-p180 :011 > u.send_message(v,"subject 1", "message 1")
NoMethodError: undefined method `ancestry' for #<ActsAsMessageable::Message:0x0000010516d2c0>
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:in `method_missing'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/attribute_methods.rb:46:in `method_missing'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validator.rb:152:in `block in validate'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validator.rb:151:in `each'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validator.rb:151:in `validate'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:314:in `_callback_before_41'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:414:in `_run_validate_callbacks'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations.rb:212:in `run_validations!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations/callbacks.rb:67:in `block in run_validations!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:413:in `_run_validation_callbacks'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations/callbacks.rb:67:in `run_validations!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activemodel-3.0.3/lib/active_model/validations.rb:179:in `valid?'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:55:in `valid?'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:75:in `perform_validations'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:49:in `save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:30:in `save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:242:in `block in save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:289:in `block in with_transaction_returning_status'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:204:in `transaction'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:287:in `with_transaction_returning_status'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/transactions.rb:242:in `save!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/activerecord-3.0.3/lib/active_record/validations.rb:34:in `create!'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/acts-as-messageable-0.3.1/lib/acts-as-messageable/acts-as-messageable.rb:71:in `send_message'
from (irb):11
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:44:in `start'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in `start'
from /Users/fiatlux1977/RubymineProjects/tsf/vendor/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:23:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'ruby-1.9.2-p180 :012 >
from acts-as-messageable.
Try upgrade to 0.4.0
from acts-as-messageable.
i did that and it works in rubymine but not in terminal somehow. must be something else in my environment. i'll try to look more.
also, do you have any samples/templates for retreiving and displaying a specific message. so i have a list of messages and i want to layout like you would in gmail. then click into a message to see the full message detail. I saw that the wiki has a controller example, but i don't see any view examples. that would save me some time.
thanks for your work on this.
from acts-as-messageable.
https://gist.github.com/93496f14e5a6200cd654
from acts-as-messageable.
Related Issues (20)
- undefined method `acts_as_messageable' HOT 2
- Sender Delete True Issue HOT 2
- Scope: Search conflicting with Ransack/Active Admin in Rails 4.1.1 HOT 5
- Multiple messageables in one app? HOT 1
- warning: Creating scope :readed. Overwriting existing method ActsAsMessageable::Message.readed. HOT 5
- Rails 4.1.0 Support? HOT 3
- `method_missing': protected method `default_scope' HOT 1
- Message class inheritance HOT 3
- Support for Rails 4.x HOT 2
- Conversation uses ancestry string
- Can't mass-assign protected attributes: body, topic HOT 2
- NameError: undefined local variable or method `root' for ... HOT 3
- mysql does not use the index named acts_as_messageable_ids
- Warning persists on last version with Rails 3.2.15 HOT 1
- ActiveAdmin + ActsAsMessageable HOT 2
- Remove deprecation warnings for Rails 6
- Update documentation for new generator name HOT 1
- Improve code coverage
- Review documentation
- is this GEM support UUID ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acts-as-messageable.