Skip to main content
ActiveRecord AssociationType Mismatch
Rails • Asked by shakycode
I have a Rails 3.2.21 app where I'm adding a simple form/collection_select field in my form. When selecting an object from the dropdown (or leaving it blank) I get the following error: ``` Act...
2
posts

Recurring Events
Rails • Asked by sid d
```ruby # Model def Event WEEKDAYS = ['sunday', 'monday', 'wednesday', 'thursday', 'friday', 'saturday'] end # Migration create_table :events do |t| t.column recurring, default: fal...
3
posts

Active Record Associations
Rails • Asked by sid d
```ruby def partner has_many :centers end def center has_and_belongs_to_many :classes belongs_to :partner end def fpclass has_and_belongs_to_many :centers end ``` - I'd like...
3
posts

Ideas for building a Wiki in my app
General • Asked by Jay Killeen
My users are all internal customers of our business. They are pretty information poor when it comes to our systems and processes and our company intranet is not very feature rich. So I'd like to bu...
13
posts

Refile :fill does not work for me
Gems / Libraries • Asked by Wesly Mezarina
I have the refile gem connected with aws by following the instruction on their github. For an image i would get something like /attachments/store/78b928c7897e3b12de80cf1ffdfdfdfdf/image.jpg ...
2
posts

Links not working on production server
Servers • Asked by Edward Bishop
I'm at a loss. After finally successfully deploying using Capistrano, and finally figuring out why my assets were missing, I have another issue. I have a link that point to static pages (contact)...
10
posts

Non Restful actions in the controller
Rails • Asked by Jay Killeen
I originally asked this question about building a reporting feature in my app https://gorails.com/forum/advice-on-building-a-reports-feature. I'd like to simplify this question even further. I w...
7
posts

API Design Decisions
General • Asked by Chris Zempel
I'm designing & building an API for a company and have arrived at a decision point I can't figure out. we're providing access to records. right now they want to quickly integrate with one cl...
8
posts

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...
5
posts

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...
5
posts

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...
4
posts

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 ...
6
posts

How to make a good Sidekiq job?
Gems / Libraries • Asked by Tang Rufus
From the [Sidekiq wiki](https://github.com/mperham/sidekiq/wiki/Best-Practices#2-make-your-job-idempotent-and-transactional), a Sidekiq job should be idempotent and transactional. How should we imp...
3
posts

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 ...
4
posts

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?
3
posts

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...
8
posts

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...
3
posts

Advanced routing setup
Rails • Asked by Thomas Bush
I recently watched the [look into routing video](https://gorails.com/episodes/a-look-into-routing). I have a very complex routing scenario I have been asked to set up for work. I was hoping I cou...
8
posts

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 ...
4
posts

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...
1
post

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.