Rails Ruby on Rails Forum

Storing Constant Date in Rails

2
Rails
What is the best way to store a set of constants like country names, currencies, city lists in a rails app? I was thinking of having a model named Constants that stores all this data and another m...
shakycode replied

Error Handling in Ruby 4+

8
Rails
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 well...
Jeff Wilson replied

First argument in form cannot contain nil or be empty

3
Rails
Alright everyone, I would greatly appreciate your help solving this problem. Here is what I'm attempting to do; I have an articles controller and all the related views to create new article posts. ...
shakycode replied

When to use scoped models?

1
Rails
In `Refactoring CSV Uploads with ActiveModel::Model Download` , you make a scoped class `User::Import`. When should we use scoped class like this? And, how does it different from `rails generate ...
Chris Oliver replied

Is Devise always a good choice?

11
Rails
I am building a contest/promotion app (see my other thread) and am now to the point at which I want to add users. I've used Devise in the past, and have also rolled my own auth system. I like the c...
shakycode replied
Solved

Dynamic view based on associations

5
Rails
I'm trying to add some view logic functionality to one of my apps. I have a "run" view that lists all runs and splits them up in a partial between active and pending. Each run also `belongs_to :r...
Chris Oliver replied

Suggestions for messaging

2
Rails
I'm working on a couple different apps right now. One is new and one I'm refactoring some new functionality into. I'm looking to add messaging between users in both apps. I'm up in the air on th...
shakycode replied

Build REST API with Devise

1
Rails
Hi Guys, I've been struggling building an API for an iOS App to communicate with my Rails Web App. For authentication, I'm using Devise. How do I create, update and delete a user through the API?...
Chris Oliver replied

Advanced routing setup

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

Tracking Rails App Usage with Analytics

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

Multi-event .ICS file generation?

11
Rails
Any suggestions for generating an .ICS calendar file containing multiple events from my models? Any experience with Gems(iCalendar vs Ri_cal), or anyone know of good blogposts, etc. detailing the ...
kayhtee replied

Multi Model Sign-up Wizard

7
Rails
Related to my previous thread (https://gorails.com/forum/structure-guidance-multi-tenancy-authentication-authorization) I plan to have authorization with Devise and some sort of role based system (...
Dan Tappin replied
Solved

Attaching a Characteristic To Multiple Models

0
Rails
I've got these models: ```ruby class Firm has_many :funds end class Fund belongs_to :firm has_many :investments end class Investment belongs_to :fund has_many :investments end class C...
Chris Zempel posted

Learning Ruby on Rails? Join our newsletter.

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