A Rails plugin is either an extension or a modification of the core framework.
Questions tagged [ruby-on-rails-plugins]
714 questions
9
votes
3 answers
How to add extra form fields outside the form declaration block
The main goal: Allow plugins, gems to add additional form fields to predefined forms.
For example, application has a devise login form:
<%= form_for(resource, :as => resource_name, ...) do |f| %>
<%= devise_error_messages! %>
...
<% end…

Uzbekjon
- 11,655
- 3
- 37
- 54
9
votes
3 answers
rails flash graph/chart plugin
I am looking for a rails flash graph/chart plugin, for drawing
bar chart,
stacked bar chart,
pie chart,
stacked area chart,
and line graphs
which support the below criteria,
1. Customizable tool tip. For eg: when i am drawing a stacked area graph,…
Nithyanandan K M
9
votes
1 answer
Saving the order of associated records in a Rails has_many :through association
I'm working on a Rails plugin that includes a way to modify the order of associated records in a has_many :through association. Say we have the following models:
class Playlist < ActiveRecord::Base
has_many :playlists_songs, :dependent =>…

Tom
- 1,007
- 12
- 13
9
votes
1 answer
wicked_pdf does not include styles
I used
<%= wicked_pdf_stylesheet_link_tag "pdf" %>
it shows the following output in the html

Nazar Hussain
- 5,102
- 6
- 40
- 67
9
votes
3 answers
Using jQuery plugins in Rails 3
Having finished Hartl's great Rails Tutorial I'm now working my way through the very good jQuery - Novice to Ninja by Castledine and Sharkie. While I've able to include jquery.js and jquery-ui.js in my rails projects, I'm getting stuck when it…

BenU
- 2,287
- 1
- 22
- 35
9
votes
1 answer
Factory_girl has_one relation with validates_presence_of
I have 2 Models:
# user.rb
class User < ActiveRecord::Base
has_one :profile, :dependent => :destroy
end
# profile.rb
class Profile < ActiveRecord::Base
belongs_to :user
validates_presence_of :user
end
# user_factory.rb
Factory.define :user…

BvuRVKyUVlViVIc7
- 11,641
- 9
- 59
- 111
8
votes
2 answers
Mount an engine on subdomain Rails 3.1
I am doing some experiments with Mountable Engines. First i need your opinion for a scenario, Is it a good idea that we make "chunk of large modules" in an application as "mountable engines".
I tried this it works great, In mountable engine we can…

Nazar Hussain
- 5,102
- 6
- 40
- 67
8
votes
2 answers
How to include a controller with a Ruby on Rails gem?
I'm trying to contribute to an open source project and I need a controller to handle a couple of forms that need to be submitted in.
I created these controllers inside a directory inside the gem called…

Yuval Karmi
- 26,277
- 39
- 124
- 175
8
votes
1 answer
Ruby on Rails CoffeeScript failing
I have this error which is making it impossible to load my app
no such file to load -- coffee_script
(in /Users/damien/projects/easyJobs/app/assets/javascripts/jobs.js.coffee)
Extracted source (around line #10):
7: /[if lt IE 8]
8: =…

Damien
- 119
- 1
- 5
8
votes
2 answers
Spork, RSpec and database_cleaner destroying development database
I have the following spec_helper.rb file in my Rails 3.1 application. I am using Spork to load the environment faster for testing. All my tests worked prior to adding Spork to the mix. After adding spork, the test database was not getting…

Steve Mitcham
- 5,268
- 1
- 28
- 56
8
votes
1 answer
Rails devise reset_password_token keeps getting marked as "expired"
I'm trying to use devise's reset_password_token to force users to change their password when they log in for the first time, using what I read here: Rails Devise: Set password reset token and redirect user
I get as far as a page loading that says…

jshou
- 672
- 4
- 19
8
votes
1 answer
Serialize With Options Configuration Blocks
I'm using serialize_with_options ( http://www.viget.com/extend/simple-apis-using-serializewithoptions/ ) in a rails project and have been using named blocks for rendering as per the example on the linked page:
class Speaker < ActiveRecord::Base
#…

Tron
- 693
- 1
- 6
- 17
8
votes
2 answers
Error generating test routes for Rails 3 plugin?
I'm trying to develop tests for plugin "foobar" that modifies some of the standard Rails helpers. In vendor/plugins/foobar/test/foobar_test.rb, I have the following:
# create the test model
class Thing < ActiveRecord::Base
end
# create the test…

Malefactor
- 122
- 6
8
votes
1 answer
Setting up a beta sign up with Devise
I have recently integrated the Devise authentication system into a rails test app. The test app simply contains a projects model/controller/view that sits behind the authentication.
I am now adding a beta invite system, so that only users who have…

Alex
- 409
- 1
- 4
- 14
8
votes
2 answers
Hiding amazon urls when using S3, Rails and Paperclip
I have just set up file uploads to Amazon S3 using Rails 3 and Paperclip. All this works amazingly well and is up and running. There is just one small detail that I would like to sort out. At the moment, the urls are the amazon urls (ie start…

Addsy
- 3,944
- 2
- 32
- 35