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
93 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
0 votes
1 answer
230 views

TLDR; How can I utilize Firebase Auth in my iOS application and sync the Firebase ID with a user in my API? I am in the process of designing an iOS application that reads from a Rails API. When first ...
Trenton's user avatar
  • 17
-1 votes
1 answer
892 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
3 votes
1 answer
258 views

I'm struggling on a design question for my Ruby on Rails website. I'm working on an estimation tool for construction companies for renovation projects. It orders items this way by default: Room (ex: ...
Shrolox's user avatar
  • 149
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
1 vote
1 answer
258 views

I am building a simple application built in Rails that allows the client to connect to a third party api to sync customer data. The customer inputs their username and password and my application ...
Joe Ainsworth's user avatar
0 votes
2 answers
784 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
0 votes
0 answers
110 views

We have several Rails applications using the same ActiveRecord, Book. For simplicity let us assume we have only these two: BookWarehouseApp (that deals how new book are added, or other inventory ...
sunless's user avatar
  • 151
1 vote
0 answers
34 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
1k views

I have a Rails app with HighSchoolTeam and ClubTeam models. I'm currently using Single Table Inheritance (STI) with Team. That means I only have a Teams table in my database, no High_School_Teams or ...
Adam Zerner's user avatar
1 vote
1 answer
363 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
2 answers
1k views

I'm a Rails developer and I've always had this doubt, let's say I have to develop things for the user's controller and views (branch feature/users-endpoint) and imagine I end up developing several ...
OiciTrap's user avatar
  • 729
1 vote
0 answers
381 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
6 votes
3 answers
676 views

In our Ruby on Rails app, we have a set of conditions to define the status of a user. Currently, there is logic that checks if those conditions are true given a user. We are in the process of writing ...
TheGeorgeous's user avatar
0 votes
0 answers
62 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
1 vote
0 answers
69 views

I’m building a web app using Rails API on server side. The goal is to make a planning manager. I want my users to be able to plan ‘daily’ events, which will display at some specific weekdays, with ...
KawaLo's user avatar
  • 129
0 votes
0 answers
265 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
9 votes
2 answers
492 views

I am working on a project where clients are able to create objects in a database. Each of these objects has a description string that describes the object. Let's assume we are looking at an object ...
wsg's user avatar
  • 199
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
0 votes
0 answers
64 views

I want to know which practice is more convenient having the following example, (my app is a Rails app but this can be applied on any framework) I am trying to create an endpoint which contains author ...
Jorge Ga's user avatar
1 vote
1 answer
193 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
1k views

I am working on a Rails application which employs a classic MVC as its fundamental structure. In that structure the controller is supposed to be responsible for "which view to render when". Now after ...
ivanibash's user avatar
  • 143
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
-1 votes
2 answers
669 views

I work for a Rails SaaS platform that was recently acquired by a primarily Microsoft shop. They are pushing the issue we need to rewrite the entire application in .NET. It's very clear they know ...
Deekor's user avatar
  • 507
0 votes
1 answer
71 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
2 votes
2 answers
150 views

I'm currently trying to figure out how to solve following problem: I have a model called Post that has, among other attributes, link_1_text, link_1_url, link_2_text and link_2_url for users to add ...
Klaus Turbo's user avatar
-1 votes
1 answer
72 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
5 votes
2 answers
1k views

I am starting a new project and trying to decide if I should use a Javascript framework (like vue.js or react) and create a Ruby on Rails API, or use Ruby on Rails to server-side render pages and ...
SegFaultDev's user avatar
2 votes
1 answer
379 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
-1 votes
1 answer
89 views

How can I measure ActiveRecord's performance? My query has where and an order by clause, and on top of that I want the top row: User.where(…).order(id: :asc).limit(1) Knowing that the order by ...
bjacquet's user avatar
3 votes
1 answer
368 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
126 views

I've got a view that renders a menu. These menu items are dynamic, in that they only appear based on some conditions (authorization, for example). I have two options: Hard code the menu in the view ...
cgat's user avatar
  • 119
1 vote
2 answers
467 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
0 votes
1 answer
120 views

Our company buys second hand valuables (item) from clients and resell them for them. In order to do the client comes to our site and ask for a shipment he may choose the time that the delivery man ...
Natan Rubinstein's user avatar
2 votes
0 answers
371 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
0 votes
1 answer
370 views

I have list boxes and model relationships in the database. I'm doing the following migrations to maintain lists, rename items, and add items: def up Fund.create min: 0, max: 1_000_000 ...
Chloe's user avatar
  • 448
4 votes
1 answer
372 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
0 votes
1 answer
2k views

I am trying to design the best way to send reminders to users for events they are registered for: reminders should be sent 72, 48 and 24 hours before the event reminders cannot be sent twice (so user ...
rhymes's user avatar
  • 101
1 vote
1 answer
450 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
4 votes
1 answer
383 views

I have a list of about 15000 items in my database, every one of them has a unique ID and name. New items are added regularly but usually not more than ten a day. My frontend uses a form with ...
krebas's user avatar
  • 49
6 votes
2 answers
713 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
5 votes
1 answer
351 views

Let's suppose I have a backend with API-only Rails. There is also a Javascript single-page application (Aurelia, but could be something else) talking to this API. Should I keep these together, in the ...
Gabor Lengyel's user avatar
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
949 views

I have a feature I'm building that aggregates data across about a dozen or so tables. This data is aggregated from a heavily joined query. This page then has a lot of filtering, sorting, counting, and ...
Andy Baird'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
110 views

In traditional Rail app, we need to deal with controller/model/action and has a view that generate HTML output. Now There are many JS framework like backbone/react that allow us to code client side ...
Yoga's user avatar
  • 325
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
-1 votes
4 answers
744 views

Background I have been programming mainly in Python in the past years and mostly on my own projects. I have developed some of my own small stilistic conventions like leaving 4 numbers of empty lines ...
Pithikos's user avatar
  • 232
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
-3 votes
1 answer
1k views

I'm currently joining a project in which there's a core REST API already developed which is used for a mobile app. The next step will be to build a web app which should also consume the API. My doubt ...
Juan Fuentes's user avatar

1
2 3 4 5 6