Ruby on Rails Community Forum

Polymorphic relationship vs STI vs Class table inheritance with RoR

4
Databases
Hi I watch your tuts and it's pretty helpful. Always thanks! I have some question about database design. There are three types of invoice items with following tables 1) **SubscriptionItems**, 2)...
Unknown replied

Error monitoring and notification for RoR

4
Servers
I'm helping on a small RoR app. I need to set up error monitoring for it. `errbit` or `exception_notification` both look pretty good. This is a small app right now (< 200 users with logins, p...
Ashley Engelund replied
Solved

Can someone help explain how to use test_double to mock a gem class in my app?

7
Testing
Hello, My app uses a gem that goes out to network devices. I want to write some specs that test my classes without going out to the network devices via the gem. I want to use test_double or some...
Bill Snapper replied

Search all models gem

2
Gems / Libraries
I have seen this done in other rails application where you can search for a term and it would search across multiple models and return results from each. What is the best gem to use for this purpos...
Chris Oliver replied

why there is no crsf token when i use remote true with data type as "script" ? How this is different from ajax?

1
Rails
<%= select_tag "event[#{inquiry.slug}]", options_for_select([ "PENDING", "CONFIRMED" ], inquiry.status), :data => {url: update_status_vendor_inquiry_path(inquiry),method: "put", type: "script...
Chris Oliver replied
Solved

ActiveRecord

3
Tips
Rails console: Memoization seems to be a pretty awesome resource.
eminkel replied

How did you become good at back end development / Ruby on Rails?

7
Rails
My introduction to Ruby on Rails was a "complete course" on Udemy and reading Michael Hartl's book. A year's worth of dedicated practice later, I'm still struggling with my skills and understandin...
Alan Reid replied
Solved

Incorporating an Admin Dashboard

1
CSS
Hi All Say you've found a sample Admin Dashboard web site. Its delivered as a 'skeleton' html.css app. In order to use it one needs to 'port' (for lack of a better term) - all the necessary reso...
JM replied

Does actioncable create 1 channel per user only?

3
Rails
Let's say you're planning on having real time Notifications and messaging. Does that mean that for each User, there will be 1 actioncable channel (redis) open? Or Does that mean for each Use...
Chris Oliver replied

How do I get e-mailed password change and confirmation links working with devise-token-auth and ng-token-auth?

0
Rails
I am trying to use ng-token-auth (Angular 1) on a separate frontend to allow passwords to be reset and account e-mail addresses to be confirmed on a Ruby on Rails 5.0 backend. Whenever I request a...
Robert King posted

Missing partial error even though lookup context comes back as true.

3
Rails
I'm getting a missing partial error even though my lookup context check comes back as true. My partials is in `views/activity_feed/` and is named `_appointment_set.html.erb` ``` <% @activities.e...
Jacob Montgomery replied

Whats the gem I can use for Tokenize Field?

1
Gems / Libraries
It would have been great to receive a tutorial on Tokenize inputs. Thanks.
Mirza Selim Reza replied

has_many :through association woes

10
Rails
I have a has_many :through relationship between a few models that *almost* works. My goal is to allow users to be assigned to projects and/or tasks. Everything seems to work except user_id's are n...
Adrian DeGus replied
Solved

How to version model validations for an API?

0
Rails
Some thoughts on API versioning: Why is API versioning necessary at all? It is required for when we want to make some breaking changes to an API endpoint, like stop accepting certain parameters o...
TRADEO posted

API design/routing with nested resources

4
Tips
Hey all! I'm just curious, how would you surface the ability to create nested items in an API? Say you have a model `Post` that `has_many observations`. I have my base routes for both Post and Ob...
Chris Oliver replied
Solved

I want to understand how basecamp separates account?

3
Rails
Is part **3319000** of url 3.basecamp.com/3319000/projects just a show action in the controller or is there implemented by gems? Will be great to see some examples. Sorry for my english.
Dan LeGrand replied

How do I debug why my ActionCable broadcast is returning nil?

4
Rails
Following along with the ActionCable Series. So in **irb** when i run the `ActionCable.server.broadcast "notifications:4", {html: "Hello"}` it comes back with **nil** instead of returning **1**. ...
Matt Taylor replied
Solved

How do I add a default time of 6:45pm to simple form / DatePicker

1
Rails
Hello Folllowing on from the prev 2 posts , How do i add the default time of 645pm in the form. So when someone craates the form a default time of 645 is already setup. I am using simple form and...
david gonzalez replied

Multistep Signup-Form

2
Rails
Hi there, do you know a elegant and quick way to create a signup page like cloud9 have? https://c9.io/signup Thanks a lot in advance!
shakycode replied

Solutions for high memory usage in rails development or production(heroku)

18
Servers
So i built my web app that allows users to chat with eachother, see who's online, and send notifications all using actioncable and it's using up A LOT of memory it seems. Correct me if i'm wrong, b...
shakycode replied
Solved

Learning Ruby on Rails? Join our newsletter.

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