ruby-on-rails-plugins

Ruby on Rails Gem & Plugin Overload! Where/how to keep up-to-date?

I'm enjoying Ruby on Rails but one thing that seems overwhelming is the shear number of gems and plugins and their branches that exist out in the wild. Sure I could gem list --remote but that doesn't tell me squat other than confirming that there are hundreds (thousands?) of gems. How are people keeping track of what's hot and what's bee...

acts-as-taggable-on fails to initialize Tag object

At some point I started getting the error message: uninitialized constant TaggingsController::Tag for @tags = Tag.all(:order=>'name') and @tag = Tag.new previously it had been working. I can see nothing that explains the cause. For at least 2 weeks it worked in production but not locally. Another developer downloaded the app an...

Live chat in ruby on rails application.

Can anyone suggest me the approach of implementing the live chat functionality in my ruby on rails application? Is there any plugin exists to implement this functionality? Thanks ...

How to avoid deprecation warning with named_scope (rails 2.X) / scope (rails 3) class_method

Hi, I build several plugins using the class method 'named_scope', which has been deprecated and replaced by 'scope' in Rails 3. I would like to avoid the following warning as I have lot a scopes present in my plugins : DEPRECATION WARNING: Base.named_scope has been deprecated, please use Base.scope instead. How to you deal with that?...

How can I force rails to recognize a method's location

I'm having trouble in my application where a controller is calling a method and the server is reporting that the method doesn't exist. This is the method call. The method not working is tag.related_tags @related_tags = @tags.collect { |tag| tag.related_tags }.flatten.uniq The Tag model is originally defined in an plugin acts-as-tagga...

`load_missing_constant': uninitialized constant Rails::Railtie

Hi All, I run rake gems:install rake gems:unpack If i add configure the rspec-rails gem in config/environment.rb: config.gem "rspec-rails", :version => ">= 1.3.2" and then run server. I am getting this error: /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning:...

Is there a way to check the parameters and decide the routes based on the parameters in rails?

I am looking for a way to decide the routes based on a request parameter.For example i want to have route a request to web controller if it has params[:web] and to iPhone if it has params[:iphone]. Is it possible to do so keeping the names of the routes same but routing them to different controllers/actions depending upon the parameter? ...

Problems using attribute_fu to update a record

I'm using attribute_fu and paperclip to add multiple images to a specific record. This is working great when creating a new record but when I want to add new images to an existing record through a common scaffold update, the images upload but replace the existing images. Any thoughts or advice? ...

simple user authentication and creation plugin in rails?

Hi i have a simple record system in rails, it has customers, appointments and visits as models. with visits and appointments belonging to customer. i want a simple authentication plug-in for the owner of the application, to be able to log in and edit and create new data in the system (administrator user) and be able to add new admin ...

Associations issue with Thinking Sphinx plugin for Rails

Hi, I have many sphinx_scopes in my application's models, but one of them doesn't work, I think it's because the odd way Sphinx store the associated values. As an example I will show some key pieces of my Product class model, product.rb: ... belongs_to :partner # And partner belongs to city ... define_index do ... has partner.cit...

Is there a ridiculously easy report plugin for rails?

It's getting old rewriting report code for Rails applications. Ya have to create the query, the routes, the action, and the view...(yes, I'm lazy) Is there anything out there that would create a full report in even fewer steps? Here's what I imagine would be ideal: You have a Report record that has a name, query code (in Ruby or SQL),...

Ruby Gem for intra-site messaging? (think LinkedIn, Facebook, etc.)

Many sites have communication via the site (instead of via email). Examples: LinkedIn: Click "Inbox" at the top of the screen. Facebook: Click "Messages" in the left sidebar. Is there a gem that provides this sort of functionality? Googling hasn't turned up much, because the search terms are so generic - "Rails gem messaging" "Ruby...

What can a ruby gem do?

I'm working on something in ruby and trying to figure out if it can be turned into a gem. I can find documentation on how to make a gem and gem manuals, but I can't find anything that says, "here is what a gem can and cannot do." Let's say I created some code, which of the following can a gem do? 1) Use rails conventions like views and...

generating a pdf file using prownto (mysql table)

Hi there, I've used Prawnto quite a bit in a few Rails projects. As I'm trying to integrate it into this project, I'm unable to get it working! I've installed the plugin, and the files are there: script/plugin install git://github.com/thorny-sun/prawnto.git I've added this line to environment.rb in the config block: config.gem "prawn"...

Appropriate way to handle settings in Rails3 Plugin?

I'm working on a plugin for Rails3. I'd like to allow users to override some settings. At the moment I'm doing this inside my plugin's Rails::Engine class like: config.my_setting = :default_value unless config.respond_to? :my_setting This seems like the wrong way to handle this. Is there a better method or convention most plugins use ...

rails awesome nested set show all cats, sub cats, and sub sub cats

Hello, I saw this post http://stackoverflow.com/questions/2059920/ruby-on-rails-awesome-nested-set-plugin but I am wondering how to do the same thing without using node? I am also wondering what exactly this node is doing in the code itself. In my categories view folder i have _category.html.erb and a _full_categores_list.html.erb. ...

How do I configure a heroku app's database that uses postgresql using the schema?

I've been using mysql forever. never really needed anything fancier. But I'm using heroku a lot and while I'm working, I like free search, so I'm using the acts_as_tsearch plugin. If you go to the git repository, it tells you: ---begin paste--- * Preparing your PostgreSQL database Add a text search configuration 'default': CREATE ...

Ruby Debugging Open Source Libraries

I would like to debug and possibly contribute to some open source gems but am fairly new to Ruby and Rails. What is the best way to go in and start setting breakpoints, etc? Right now I just use ruby-debug for my own code and inspect variables mostly. ...

How do i test routes in Rails 3 plugins?

I've tried to use the recommended way (from the Rails Guides) to test routes generated in plugins, but the test keeps failing. What's odd is that if I reload the routes AFTER creating the route (or so I think), the test fails, but if I let the test go through once (e.g. using autotest), then the route gets recognized on subsequent attem...

ruby on rails authlogic visit count

I'd like to count (increment) each time a user visits my site. I'm using authlogic and none of the "magic" fields take care of this. By visit I mean: It counts only once when a user visits the site. So it should count when they login, but ALSO count for users who have the "remember me" set to true. login_count table field only counts w...