Skip to main content

Questions tagged [ruby-on-rails]

Ruby on Rails is an open-source web development framework optimized for programmer happiness and maintaining sustainable productivity. Many things are defined by convention, freeing you from having to re-invent things to stay productive.

Filter by
Sorted by
Tagged with
0 votes
1 answer
86 views

I have a task to develop a website that allows storing of data resources from other APIs and users can analyse and visualize this data. This data is sensitive and data leakage should be minimal. I ...
axelmukwena's user avatar
-1 votes
1 answer
876 views

I'm working a project where I found another developer wrote a method as you see it below. How would I clean those IF statements and refactor this method. Also is it ok ti set a variable to nil ? def ...
egyamado's user avatar
  • 117
6 votes
3 answers
4k views

Currently working on a Ruby-on-Rails codebase, testing is done with Rspec. We use BuildKite to run tests. We are in a situation where sometimes tests will fail, and upon a retry or two, pass. AKA, we ...
Julien Chien's user avatar
0 votes
2 answers
761 views

For the following table structure, for the metric_id column, what are the advantages of having a JOIN dictionary table versus an ENUM dictionary defined in the code? Assuming the metrics dictionary is ...
Dunams's user avatar
  • 9
1 vote
0 answers
31 views

I'm trying to figure out the best way to "partially" use the validates_uniqueness_of validator for a particular case of problem. Let's say I have a Book class with multiple comments, with the Comment ...
dtynan's user avatar
  • 19
1 vote
1 answer
354 views

I built an audio processing web app using Rails. The user uploads a song to the website. The song is then decomposed into individual elements and then modified and recombined. I am using a an open ...
musicjackx's user avatar
1 vote
0 answers
374 views

I have a webapp using ReactJS as the frontend and Rails as the backend service. I have an account manager, where a user can choose multiple avatars from a default library. This library contains ...
KawaLo's user avatar
  • 129
0 votes
0 answers
53 views

I am working on a little project which essentially allows me as the administrator to upload new products to the app (each product would be a video explaining product) which would have its own specific ...
justlivinglife's user avatar
0 votes
0 answers
258 views

I need to validate a value with data from an external API. The easiest way would be to add a validation rule in my model, call the external API and do my check. But it feels very dirty to call an API ...
Nghi93's user avatar
  • 1
7 votes
1 answer
2k views

My team is debating how to transition a portion of our Rails application to allow "drafts". For simplicities sake, we can imagine a Post object where we want to allow a kind of draft mode. Our real ...
rooney's user avatar
  • 139
1 vote
1 answer
188 views

I have in mind to develop a Ruby on Rails app with two different databases. In the primary SQL db - let's say MySQL, for instance - I'd keep my app items, e.g. user profiling, user-user interactions ...
Matteo Schiavi's user avatar
2 votes
3 answers
2k views

I recently joined a company where I was tasked with building a system for one of their clients. The work I've done is so far working well, but the most senior developer on the team who's been with the ...
Greenspud Coder's user avatar
0 votes
1 answer
63 views

I'm developing an API in Rails and the following requirement is established (it's really more complicated, but I want put a simple example): There are users and messages. users have a gender (...
OiciTrap's user avatar
  • 729
-1 votes
1 answer
60 views

I have the following tables: Organization. Articles Templates Organization is the parent of both articles and templates. On the articles index page, I display (by default) all templates for the ...
NathanB's user avatar
2 votes
1 answer
373 views

I was in a job interview demo-ing a RESTful API in Flask when an argument broke about the API. The interviewer argued that the URL for adding a new user (/users/new) is not proper REST. My API ...
Pithikos's user avatar
  • 232
3 votes
1 answer
361 views

Let's take two simple Rails models, Post and PostRevision. class Post < ApplicationRecord # Attribute: Status (ex: draft, public, private, deleted) # Attribute: Views # An owner, likely a ...
Thomas Owens's user avatar
  • 85.9k
1 vote
2 answers
458 views

I am working on a ruby on rails learner project that uses multi-tenancy. This project has states(tenant) and cities(sub-tenants). User can only belong to one city. For first level i.e for states I ...
Uday kumar's user avatar
2 votes
0 answers
370 views

I've been looking around hoping to get some perspective of the pros and cons of using a Single Page React App vs. a Multi Page React App. The end product of the project is a page with 5 tabs, each ...
linuxNoob's user avatar
  • 183
4 votes
1 answer
365 views

I'm currently building an interactive game which has a very special use case : The game is displayed on a giant screen on stage in a theatre, and the audience can play it with their smartphones (http:/...
Caillou's user avatar
  • 256
1 vote
1 answer
441 views

I have a Rails 5 application with Resque as the background job backend. A typical job does quite a few things, mainly it collects stuff from HTTP services, processes and aggregates some of the ...
Gabor Lengyel's user avatar
6 votes
2 answers
706 views

I'm developing a Ruby on Rails app. The app contains a service wrapping an external REST API, called from a controller, with several possible error states. The current implementation returns the ...
jacwah's user avatar
  • 395
1 vote
2 answers
4k views

I'm learning Ruby on Rails coming from Node.js/express and had a few design questions. I used React.js for the frontend in my Node apps and I'm planning on continuing to do so in my Rails apps. What ...
Carpetfizz's user avatar
3 votes
3 answers
26k views

I'm considering different designs for a generic role library gem. The first is based off the Rolify gem but with a has_many through: relationship instead of HABTM. HABTM tables are "headless" in ...
papirtiger's user avatar
1 vote
1 answer
2k views

Im writting a web-page in Ruby on Rails , so i can learn the language and framework better. I have a User model which has_many Classifieds models which has_many Photos which accept_attachment :image. ...
frcake's user avatar
  • 121
4 votes
2 answers
2k views

I have an external ecommerce link that varies based based on environment (testing and production systems). Where should it go in Rails? Possibilities include: a conditional directly in the template, ...
SexxLuthor's user avatar

1
2 3 4 5 6