Ruby on Rails Community Forum

Single Table Inheritance: Good spot or not?

3
Rails
I have two simple models I'm about to create in an existing Rails app. One is a `NAICSCode` which has the following attributes: `company_id`, `code`, `name`, and `description`, the other is `SICCo...
shakycode replied

How to build a web scraper using Ruby...

1
Ruby
Hello Chris - can you please teach us how to build a web scraper using Ruby to collect data from the web?
Chris Oliver replied

CoffeeScript check if a checkbox is checked?

10
Javascript
I have some simple CoffeeScript that toggles a div based off of if a checkbox is checked in a Rails form. The CoffeeScript looks like this: ``` $("#bill_patient_checkbox").change -> $("#...
David Becerra replied

ActiveRecord AssociationType Mismatch

1
Rails
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: ``` Active...
shakycode replied

Recurring Events

2
Rails
```ruby # Model def Event WEEKDAYS = ['sunday', 'monday', 'wednesday', 'thursday', 'friday', 'saturday'] end # Migration create_table :events do |t| t.column recurring, default: false t.co...
Chris Oliver replied

Active Record Associations

2
Rails
```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 to access all ...
shakycode replied

Refile :fill does not work for me

1
Gems / Libraries
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 w...
Chris Oliver replied

Links not working on production server

9
Servers
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)...
Chris Oliver replied

Must Read / Must Watch

19
General
I thought I'd start a thread of articles and videos that are super high quality for software developers. Things that make you think and improve your thinking and how you build products. I'll start...
emil mircea replied

API Design Decisions

7
General
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 clie...
shakycode replied

Idea for TimeClock Need Advice

27
General
I'm wanting to integrate Time Clock functionality into an existing Rails 3.2.21 app. I think I have an idea of how to do this, but I need some advice on the how to handle different scenarios. So ...
shakycode replied

Render \r\n in javascript.erb

4
Javascript
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_conditions").val...
Chris Oliver replied

Ideas for building a Wiki in my app

12
General
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...
shakycode replied

Using Devise in Consumer App

4
Gems / Libraries
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...
rabin prithvi replied

Non Restful actions in the controller

6
Rails
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 wan...
shakycode replied

Select Form Helper Required True Not Working

3
Rails
I'm doing a very simple select field in a form which looks like this: `<%= f.select :phys_option, options_for_select([["N/A", "n/a"], ["No", "no"], ["Yes", "yes"]], :selected => @run.phys_op...
shakycode replied

How to add records to has_many :through association

5
Rails
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 ...
Wes replied

Deploy and delete text!

2
Servers
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?
shakycode replied

Set field on multiple records on save/change of 1 record

3
Rails
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...
Chris Oliver replied

Advice on building a 'reports' feature

9
General
My Ruby on Rails enterprise app has a whole range of tables ranging such as customers, products, sales, warehouses, prices etc etc. I'd like to build a whole range of different reports that users ...
Daniel Chapman replied

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.