Open saravk opened 13 years ago
Thanks sarav, are you using rails 2.3.x or rails 3?
If rails 3 are you using the rails3 branch of the plugin?
I could see #1 being and issue and I'll investigate further #2. But #3 I am confused on. #try is an activesupport method so if you are using it in rails that should work...
I'll look into it soon.
Thanks, ~ Tom
Im using rails 2.3.x and i installed from the main branch (as mentioned in the README doc)
For #3, please check the console output.
t.block(u) => #<Follow id: 26, followable_id: 2, followable_type: "Talktopic", follower_id: 2, follower_type: "User", blocked: true, created_at: "2010-12-17 19:56:32", updated_at: "2010-12-17 19:56:32"> u.follow(t) => nil t.followers => [] t.unblock(u) NoMethodError: undefined method
try' for #<Follow:0x102b44b70> from /Users/saravanak/RailsWorks/kettikgit/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:256:in
method_missing' from /Users/saravanak/RailsWorks/kettikgit/vendor/plugins/acts_as_follower/lib/acts_as_followable.rb:87:in `unblock' from (irb):9
sorry about the formatting above..
Thanks,
I will be sure to check these out. Thanks for the reports.
~ Tom
I am also getting ...
User Load (0.3ms) SELECT "users".* FROM "users" LIMIT 1 NoMethodError: Follow Load (0.3ms) SELECT "follows".* FROM "follows" WHERE "follows"."followable_id" = 1 AND "follows"."followable_type" = 'User' undefined method `unblocked' for []:ActiveRecord::Relation
when calling User.first.followers. I'm running rails 3.2.8 though.
Looking forward to getting this working.
??
First off i'd like to say that this plugin is a godsend. I was able to implement a comment notification system for my website in minutes. One of the features for the notification system is to let the user block himself from receiving notifications for a particular topic.
But the block system in the plugin did not seem to work, so i added a few patches to my local code. I have to say that im not very proficient with rails coding, so do ignore the chunky code.
Issue1: follow method should check if there is a blocked entry before creating a new Follow record
def follow(followable)
SARAV-PATCH-START
The next 2 issues could be something to do with my environment. But as i said im not very familiar with rails, so i just patched it.
Issue 2: NameError: undefined local variable or method `follows' in In block_future_follow
def block_future_follow(follower)
SARAV-PATCH-START
Issue 3: NoMethodError: undefined method `try' in unblock method
def unblock(follower)
SARAV-PATCH-START
Please let me know if my changes are alright.. And thanks again for this wonderful plugin