Skip to main content
Render \r\n in javascript.erb
Javascript • Asked by Wouter van den Beld
HI, I try to add the value of a text field in a form from a other database field. I use the following javascript ```javascript $("#assignment_conditions").empty(); $("#assignment_condition...

Using Devise in Consumer App
Gems / Libraries • Asked by rabin prithvi
I have two applications. One is Rails API consumer app and another is a legacy PHP one - which responds with JSON API. APIs are used for user registration and login. Can I use Devise for authentica...

Set field on multiple records on save/change of 1 record
Rails • Asked by Wouter van den Beld
I'm working on a maintenance planning/cost application. With the help of gorails, onemonth, codeschool and all other great resources I am almost ready to launch the first release. However I can rea...

How to add records to has_many :through association
Rails • Asked by Wesly Mezarina
I have three models called Site, Model and ModelSite as shown below. If i create a new model_site i can choose a site and model to save which works good but what i need help in is how can i choose ...

How to make a good Sidekiq job?
Gems / Libraries • Asked by Tang Rufus
From the [Sidekiq wiki](, a Sidekiq job should be idempotent and transactional. How should we imp...

Select Form Helper Required True Not Working
Rails • Asked by shakycode
I'm doing a very simple select field in a form which looks like this: ` @run.phys_option), :include_blank => true, :required => true, :class => 'select' %>` This works with basic ...

Deploy and delete text!
Servers • Asked by Artem Kiryanov
Help! When i deploy my app from local machine to vps, my local image, text and another information have been deleted! How can i fix it?

Import CSV data using RubyZip and Postgresql COP
Gems / Libraries • Asked by Jay Killeen
I've checked out the videos on importing data to your rails app. Very timely as I am deep into this feature bringing data from all our legacy systems into my rails app. My issue is I am importin...

Populate dropdowns based on selection
Javascript • Asked by Jay Killeen
I'd like to get people's thoughts on the best approach. I'd like to have a search ability where once a selection if made, the next dropdown box populates with only the available options from the...

Advanced routing setup
Rails • Asked by Thomas Bush
I recently watched the [look into routing video]( I have a very complex routing scenario I have been asked to set up for work. I was hoping I cou...

Tracking Rails App Usage with Analytics
Rails • Asked by Jay Killeen
Hi I notice this site uses Google Analytics to track usage. Is that the standard when it comes to tracking your rails apps? I know it is generally pretty standard in the case of my websites but ...

Flexible Nested Attributes
Rails • Asked by Terence Devine
I'm working on a practice "Magazine" application, that has **Issues** with nested attributes of **Articles**, which has multiple nested attributes that are **Content Blocks**, which can be one of s...

Simple newsletter sign up?
Rails • Asked by Gareth Gomersall
Hey Chris and all other members of this forum.... I'm trying to create a single page rails site, for a new app that i'm trying to build myself (it's called Nibli, and it's on I...

Other intermediate-advanced ruby/rails websites?
General • Asked by Boris Baskovec
Hi, I don't know if it's allowed here, to talk about other resources to learn Rails and ruby, but I'm looking for more intermediate-advanced guides and/or screencasts that are up-to-date I'm ...

Importing datasets. Recommendations?
Databases • Asked by Brent C
I have a few datasets that I need to import into my rails app. They vary from 100 records to 5000 which will span across a few models with various associations. Q.1: I can cleanse the data prio...

Mobile App with Devise Facebook OmniAuth
Gems / Libraries • Asked by Tang Rufus
My Rails 4 app is using Devise and Facebook OmniAuth. The web app is working perfectly. Now I want to make a iOS app to consume my rails app's API. Instead of telling iOS users to type in their...

Pundit for RESTFUL actions on Model fields
Rails • Asked by Jay Killeen
Hey does anyone know how to use Pundit to control a users ability to edit a field. I'd like all users to be able to change simple things like their name but I want admins to be the only one's who c...

Displaying an address from a selected location
Javascript • Asked by shakycode
So in a form I have locations which are set in a `collection_select` statement in the form. Each location has a name (Dairy Queen, McDondalds, etc) and has an address in the Location model. When ...

JSON for Rails delegated attributes?
Rails • Asked by Brian Schwartz
In one of my Rails apps, I have the following architecture (as part of a current refactoring): - Contact (a lot of attributes common to all people) - Prospect (specific attributes to just pro...

Error Handling in Ruby 4+
Rails • Asked by Nathan La Barbera
Does anyone have any thoughts or why this might be a bad practice? I am using the following code as the last route within my routes.rb get "*path", to: redirect('/') It seems to handle very...