Comments (4)
Can you give me details on your configuration ?
regards
Rawane
Le 27 mars 2011 à 22:11, lpsBetty a écrit :
I added the gem like this:
gem "amistad" # Gemfile
installed and migrated
include Amistad::FriendModel # user.rbbut if I use any method (like 'friend_with?' or 'friends') I am getting this error:
undefined method `attribute_condition' for #Reply to this email directly or view it on GitHub:
#10
from amistad.
I'm also getting this error. I'm using the Devise library on the same User Model I'm using Amistad on. Not sure if this is the problem.
from amistad.
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/base.rb:1009:in method_missing' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/postgis_adapter-0.8.1/lib/postgis_adapter.rb:90:in
block in sanitize_sql_hash_for_conditions'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/postgis_adapter-0.8.1/lib/postgis_adapter.rb:69:in each' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/postgis_adapter-0.8.1/lib/postgis_adapter.rb:69:in
map'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/postgis_adapter-0.8.1/lib/postgis_adapter.rb:69:in sanitize_sql_hash_for_conditions' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/base.rb:1226:in
sanitize_sql_for_conditions'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/base.rb:1735:in interpolate_and_sanitize_sql' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/association_proxy.rb:169:in
interpolate_and_sanitize_sql'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/through_association_scope.rb:126:in block in build_conditions' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/through_association_scope.rb:125:in
each'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/through_association_scope.rb:125:in build_conditions' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/through_association_scope.rb:112:in
conditions'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/through_association_scope.rb:26:in construct_conditions' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/has_many_through_association.rb:95:in
construct_sql'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/association_collection.rb:24:in initialize' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations/has_many_association.rb:11:in
initialize'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations.rb:1483:in new' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.7/lib/active_record/associations.rb:1483:in
block in collection_reader_method'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/amistad-0.7.4/lib/amistad/active_record/friend_model.rb:69:in friends' from (irb):1 from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands/console.rb:44:in
start'
from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands/console.rb:8:in start' from /Users/me/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:23:in
<top (required)>'
Stacktrace
from amistad.
oh sorry i totally forgot that issue.. however i've not used that gem
but now i know it was caused by postgre - thank you ;)
from amistad.
Related Issues (20)
- friends does not work with .paginate! HOT 3
- Adding a friend multiple times. HOT 1
- Major performance issue after upgrading to 0.9.x HOT 1
- Mysql2::Error: Unknown column 'friendships.friendable_id' HOT 1
- configuration HOT 1
- pagination and search in friends method HOT 1
- amistad-0.9.2/lib/amistad/friendship_model.rb:9:in `included'
- invited? method on user conflicts with Devise invitable HOT 1
- Getting blocked_by list HOT 1
- user.friend_ids HOT 1
- About query and performance
- Deprecated options in has_many HOT 5
- Polymorphic association broken using Amistad HOT 1
- How to reject a friend request HOT 1
- wrong number of arguments (3 for 2) HOT 2
- Wrong number of arguments (3 for 2) HOT 1
- Multiple friendship models HOT 2
- uninitialized constant User::Amistad
- Database info show up when listing HOT 4
- SQLException: no such column: friendships.friendable_id
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 amistad.