ruby-on-rails-plugins

Rails - Passing a collection to the layout for will_paginate?

I have my <%= will_paginate %> code block in the layout of my application. I'd like to pass this block different collections depending on what controller/action I'm in. How can I do this? ...

Restful_authentication plugin not working

I'm using restful_authentication plugin for Ruby on Rails. All seems fine except that it seems the user session is not getting created at all. I have the create method below. It appears that the self.current_user is being set but that the actual session is never created. When and how is the current_user_session supposed to be defined...

Acts_as_Inviteable Plugin not sending out invites in Ruby on Rails

Hi, I have been trying to create beta invites that each existing user can send out and was hoping to be able to use a plugin called acts_as_inviteable http://github.com/brianjlandau/acts_as_inviteable I was wondering if anyone had direct experience with it. When I checked the console, it appears to be creating the right queries, but n...

Building a ruby gem for Rails applications

As a Rails developer I feel a bit stupid asking this question but hopefully I will learn something new and someone can put me out of my misery! In my rails applications I use (other peoples) gems all the time, I also use plugins from the community or my own. I understand the benefits of use gems over plugins as they are version-able, se...

Mahout Plugin for ruby on rails.

I want to use Apache Mahout in my project on Ruby on Rails for implementing recommendations and collaborative filtering. In Particular my requirements are: suggesting related tags. suggesting related articles. based on user's preferences prompt him for review of articles. based on geographical location, and other meta information of a ...

[Rails] Using find method to find NOT matching

I'm trying to look up a User by group_id. My method looks kinda like this: User.find(:all, :conditions => {:group_id => '90a39597a1aa3ec65fccf29ae05d9b6aefbfea6b', :id => !current_user.id}) The :id condition doesn't make sense because I don't know the syntax for this part. How would I find a user by group_id and :id which doesn't matc...

Rails CanCan Auth Problem

I am using the CanCan authorization plugin (http://github.com/ryanb/cancan) for my application and it has worked great so far. I had it set like the following: class Ability include CanCan::Ability def initialize(user) user ||= User.new # guest user if user.role == "admin" can :manage, :all else can :r...

Acts as Tree with Multiple Models

I've got several models that I'd like to relate together hierarchically. For simplicity's sake, let's say I've got these three: class Group < ActiveRecord::Base acts_as_tree has_many :users end class User < ActiveRecord::Base acts_as_tree belongs_to :group has_many :posts end class Post < ActiveRecord::Base acts_as_tree ...

Rails ACL plugin that works with devise/warden?

As title, warden is very pluggable, I wonder if there is anything works with warden/devise? ...

Testing Rails plugin with helper that calls update_page

I'm writing my first Rails plugin, and I'm quite stuck testing it. In simplified form: module Flashbulb def flash_messages() return <<END <!-- some HTML --> <script type='text/javascript'> #{update_flash_messages()} </script> END end def update_flash_messages(args = { :page => nil }) update_flash = lambda { |...

when I am deploy my ror application on production then I am getting following error

in `gem_original_require': no such file to load -- haml (MissingSourceFile) but this gem already istalled. I have also plugin for this path :-/home/techvant/rails_app/techease/vendor/plugins/haml/init.rb this init file having following code : - begin require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here rescue ...

Whenever Plugin Help

I am trying to use the Whenever plugin for rails to perform a model process at certain times. My schedule.rb is as follows: every 1.day, :at => '5:30 am' do runner "User.mail_out" end My model is as follows: class User < ActiveRecord::Base acts_as_authentic def mail_out weekday = Date.today.strftime('%A').downcase ...

Error when submitting custom mail process (whenever plugin)

I am trying to use the Whenever plugin for rails to perform a model process at certain times. When I try to use the mail_out process in my User model, I get the following error. Can someone please point me in the right direction of what is going wrong? /var/lib/gems/1.8/gems/rails-2.3.5/lib/commands/runner.rb:48: /var/lib/gems/1.8/gem...

Deploy rails app to non-root context - restful_auth not working

I'm running a rails app on http://www.naildrivin5.com/scalatour. It works fine. When I log in to the app using restful_authentication, I get taken to the http://www.naildrivin5.com instead of the app. Weird. This seems like I've misconfigured something. Further, there's a few places where I'm hand-creating some urls, and I need ac...

Rails Error When Trying To Mail to Multiple Users

I am trying to use the Whenever plugin for rails to perform a model process at certain times. When I try to use the mail_out process in my User model, I get the following error. Can someone please point me in the right direction of what is going wrong? /var/lib/gems/1.8/gems/rails-2.3.5/lib/commands/runner.rb:48: /var/lib/gems/1.8/gem...

How do I access options passed to an acts_as plugin (ActiveRecord decorator) from instance methods?

At the moment I store each option in its own class attribute but this leads to hard to read code when I need to access the passed options from instance methods. For example if I pass a column name as an option I have to use self.send(self.class.path_finder_column) to get the column value from an instance method. Notice I have prefixed ...

Getting authlogic_facebook_connect to create users in DB

Hi all, I'm using the Authlogic Facebook Connect plugin on my site. After a bit of a struggle I can sign in with FBConnect, I can get stuff from the FBSession, like the users name, and I can logout. But, the README on the plugin site seems to suggest that following the five steps will result in the FB UID being saved in your local datab...

Getting the skype status of user in a rails application

I have a rails application in which user provides his skype address.I want to able to determine the skype status of the user(online or offline) when some one sees his profile. How can i do that in my application? Does any know of a ready to use gem/plugin? ...

Importing gmail/yahoo/hotmail/aol address book with rails

Hello, I want to import address book of users from their gmail/hotmail/yahoo and aol address books. I am looking for a gem/plugin in rails which can help me do this. Any help is appreciated. Thanks. ...

"Was dirty" plugin for ActiveRecord?

I'm working on some code that uses a lot of after_save callbacks, and I remember seeing a plugin that allows the model.changes array to persist after a call to save. It would be a great help if I could just write if body_did_change? in my after_save calls, instead of having to hack together something with a before_save filter just to se...