ruby-on-rails-plugins

RoR plugin for inviting friends

hi, could u suggest some socialnetworking plugins for inviting and adding friends, for both registerd and unregistered users in website. thanks ...

Ruby on Rails: Plugins/gems for converting a .xls file to a .pdf file?

Hi, what are the Rails plugin/gem solutions for converting a .xls file into a .pdf file? Thanks a lot for any feedback! Tom ...

Should I create a Ruby gem or plugin

I have some logic code that is literally cut and pasted across several different sites I own (it's code that interacts with a web API I've created). Considering that this isn't DRY and that when I update one thing I want it to update across all my sites I wanted to move this to a gem or a plugin. My main question is which one is the be...

Rails "script/plugin" install http://github.com...git hangs on 'git pull'

Whenever I run the rails script/plugin install to install a plugin using git, from github it "hangs". $ script/plugin -v install http://github.com/ryanstout/blog_kit.git It "hangs". the -v gives me the following output: Plugins will be installed using http git init Initialized empty Git repository in /home/XXX/vendor/plugins/blog_ki...

rails: authlogic passing a session parameter to UserSession.find

I'm passing the user session via a parameter (params['session_key']) for one controller (it's a flash upload script so I have to pass it via a param). I don't know how to access the user session with authlogic by using the raw param string. Normally I do this: @current_user_session = UserSession.find I thought I could do this: @cur...

Where I got a NoMethodError using restful authorization??

This is the code from my login Page: <%= flash[:notice]%> <h1>System</h1> <%= Time.now%></p> <p><%=link_to "Register", signup_path%></p> <div id="login"> <%if logged_in? %> <b><%=current_user.login%></b> <%=link_to "Signout", logout_path%> <%else%> <% form_remote_tag :url => sessio...

Paperclip image uploads in Rails - Paperclip::CommandNotFoundError

I'm using paperclip to handle image uploads to rails. it worked fine on my dev OSX machine, but now on my web server I get this error: [paperclip] /Users/marky/bin/identify '-format' '%wx%h' '/tmp/stream,16451,2.JPG[0]' 2>/dev/null [paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Paperclip::CommandN...

Using acts_as_recommendable for a production site

Hi...I was looking for ways to include recommendations in my application. I came to know about acts_as_recommendable plugin. I would like to know your experiences while using it in your application. I would like to specifically know about Accuracy Pitfalls and any other stuff you would like to point out Thanks :) ...

How to validate that zip code enter by user is correct US zipcode

I want to validate that zip code entered by user is valid or not. for example user entered 009876654 and it is not valid then an error message should be given. I know i can do it using javascript regulr expression or using ajax-zip-code-database But i don't want any of the above. i need some plugin sort of thing which send request t...

Solution for comments for a Rails application

I'm introducing comments into a Rails application, and, being exceptionally lazy, I'm looking for a plugin to do it for me. I came across acts-as-commentable, but I didn't find much else. Acts-as-commentable seems fine, but it doesn't have support for threading. Of course, it wouldn't be too hard just to home-brew the entire thing, but ...

How to install a git plugin on Rails 3

Hey everyone, I'm completely new to Rails and just installed Rails 3 on Ubuntu 10.04. I was wondering if someone could please explain how to install a plugin from a Git repository. More specifically, I'm trying to install the restful-authentication plugin from the git repository: git://github.com/technoweenie/restful-authentication.git...

Customizing attachment_fu?

I am working with the attachment_fu plugin for my file uploads, while it does some things very well I am finding it very difficult to customize. One of the problems I am having is that the errors messages attachment_fu produces are not very helpful to the end user. For instance, if you do not specify a file to upload you all of these err...

Has anyone got any experience using Pfeed? I have several issues to build up a 'recent activity' log.

Hi there, I have started trying to use Pfeed plugin for my Rails app. Apart from four support pages of wiki on the Github, I only found this blog post helpful for me to start using. I have managed to get the simple feeds working like "User bought 12 items about 1 minute ago" etc. But when it comes to customize the feed items, that's w...

Callback after delayed_job process job

I need to update a model after delayed_job processes a task on it, e.g: foo.delay.something After something is done, I need to update the foo object, what is the best way to achieve this? I was thinking in coding a callback on the Delayed::Backend::ActiveRecord::Job class, but there's should be something cleaner and better to do this. ...

Rails cancan authorizing custom controller actions

I have a Deals controller and I have an action called popular. I have added the popular to the routes (as a collection, if it's worth the info) and I want everybody to be able to acess that page. I'm using CanCan and I have this: class Ability include CanCan::Ability def initialize(user) user ||= User.new alias_action [:...

Rails 2.3.5 engine (plugin) how to specify gem requirements

When creating a rails engine in 2.3.5 as a plugin, how can the gem dependencies be set within the plugin, without having to import them into the host applications environment.rb? Basically, I need to be able to call "config.gem" after Initializer.run has been called by environment.rb, since the plugin has not been loaded when the confi...

Rails Dynamic Role-Based Authorization plugin?

There are a lot of role-based authorization plugins out there. They work great when you know in advance what the roles are going to be. For example, if I know I'm going to have administrators, super_users, and not_so_super_users. What I really want is to be able to create custom roles and assign that role to a user. At this point, I am ...

Testing rails controller with rspec within a plugin

I'm writing a Rails plugin and I'd like to be able to test a controller within the plugin: describe ReportsController, :type => :controller do it "shows paginated reports if the user is authorized" do get 'index' response.should render_template("index") end end unfortunately this results in the following error: NoMethod...

Mounting multiple instances of the same engine in Rails 3

Hi, I'm wanting to make use of the new modularity prospects offered by the architecture changes in rails 3. However, rather than just mount an engine as in the majority of examples... Rails.application.routes.draw do match "/blog" => Rack::Blog end ...I'd like to mount multiple versions of the same engines, and have those instance...

Error with overwriting Ruby class only manifests itself in production?

I recently ran into an odd error that only occurred in production mode. I was using the paths of glory gem that defines the class Achievement (http://github.com/paulca/paths_of_glory/blob/master/app/models/achievement.rb). In the base class, level is defined: def level(level, options = {}) levels << {:level => level, :quota => optio...