Questions tagged [ruby-on-rails-plugins]

A Rails plugin is either an extension or a modification of the core framework.

Documentation

Related tag

714 questions
6
votes
2 answers

Rails Counter Cache and its implementation

I am trying to get hold of rails counter cache feature but not able to grasp it completely. Let's say that We have 3 models A B C A belongs to B or C depending upon a field key_type and key_id. key_type tells whether A belongs to B or C so if…
Ishu
  • 628
  • 1
  • 13
  • 28
6
votes
3 answers

How to pre-process CSV data for FasterCSV?

We're having a significant number of problems creating a bulk upload function for our little app. We're using the FasterCSV gem to upload data to a MySQL database but he Faster CSV is so twitchy and precise in its requirements that it constantly…
6
votes
3 answers

CanCan: load_and_authorize_resource in namespace other than that of MainApp

I'm using CanCan for permissions in my Rails application in which I have built my own engine for some generic form functionality. I would like to lock down permissions in my system so that users cannot freely access my engine controllers' actions.…
Chiubaka
  • 801
  • 2
  • 11
  • 27
6
votes
6 answers

Ruby on Rails HTML-Table Generator

I am looking for a good RoR table generator (or an easy solution) that can give me a decent view of my records in a table (unstylized but proper strict XHTML). Let's say I have a User model and an Address model: - A User can have many Addresses -…
chrishomer
  • 4,900
  • 5
  • 38
  • 52
6
votes
2 answers

Creating WYSIWYG form builder (á la Wufoo) in Rails

I have to add Wufoo-like WYSIWYG form-builder functionality to a Rails webapp. Does anyone know of good resources (gems/engines/plugins/example code) that would help?
6
votes
1 answer

require 'rubygems' not working

when I type irb> require 'rubygems' it returns false. I have many gems in my rails app that are obviously working - rake, activerecord, etc. What could be going wrong here? thanks. Ruby 1.8.6. Rails 1.2.6
happythenewsad
  • 1,765
  • 3
  • 15
  • 17
6
votes
2 answers

Rails: Act_as_taggable_on vs. Rocket_tag

Looks like Act_as_taggable_on is the more established gem, but Rocket_tag is the newer and hotter one. Which one would you recommend, and why? Most of the posts I found that compared Rails tagging were fairly outdated, and I was wondering if anyone…
6
votes
2 answers

How do I create a rake task for a Rails engine which is not exposed to the host application?

# lib/tasks/test.rake task :hello do puts 'hello' end $ rake app:hello To run the task I need to prefix it with "app:" and it runs in the context of the dummy app. It is also exposed to the host application (i.e when used as a plugin in a parent…
Kris
  • 19,188
  • 9
  • 91
  • 111
5
votes
1 answer

Is it possible to use best_in_place with typeahead from twitter bootstrap?

Basically, I am using best_in_place in my rails webapp to let users edit their profile info in place. The thing is, I would like users to be presented with a typeahead form for certain entries.. Here's what I'm working with:

College/University:…

5
votes
1 answer

Railtie Initializer not running in plugin

I recently switched from the gem version of resources_controller to a plugin as the gem version relied on git. Inside the vendor/plugins/plugin/lib/plugin.rb file, the Railtie is as follows: module Ardes module ResourcesController class…
5
votes
1 answer

Accessing a model from a Rails 3.1 Engine

I have been wrestling with this for the last day and it's driving me NUTS! As an learning exercise I decided that I would package up some of my code into a Rails Gem. This code has a controller action, a route, a model and a helper so I decided that…
5
votes
2 answers

Rails 3.1 Mountable Engines : How to use/template it inside another application?

Let's say I created a mountable engine called 'Soho' that has a controller for 'Users'. I can go to /users/1 to see my user with ID 1. Inside 'Soho', I have a application.html.erb for layout. Now let's assume I want to "blend" my engine 'Soho' in an…
Dominic Goulet
  • 7,983
  • 7
  • 28
  • 56
5
votes
2 answers

Can I change config.cache_classes programatically in Rails 3?

I have some iPhone client tests that run against my development rails server. The whole suite runs an order of magnitude faster if I turn on class caching in the Rails config. On the other hand, that slows down development when I'm not actually…
5
votes
6 answers

Which State Machine plugin do you recommend for Rails?

I am looking for a relatively simple state machine plugin for a Rails 3 / Active Record project. I've done a little research and come up with the following plugins: Transitions: https://github.com/qoobaa/transitions Extracted from old Active…
5
votes
2 answers

How to override Rails app routes from an engine?

I have a Rails app that I am trying to integrate a Rails engine in to. The host app has some catch all routes: # magic urls match '/' => 'admin/rendering#show' match '*path/edit' => 'admin/rendering#show', :defaults => { :editing => true } …