Default Order of Associated Model Collection?
I know right?! Seriously amazing people here. Welcome to the group! 🤓
Chris Oliver replied • SolvedI know right?! Seriously amazing people here. Welcome to the group! 🤓
Chris Oliver replied • SolvedI have a basic model structure like this: ``` class History < ActiveRecord::Base belongs_to :historical, polymorphic: true, touch: true end ``` with several related models: `has_many :histo...
Dan Tappin postedI've primarly built out support to book a flight, and now I'm looking to offer the ability to book a hotel as well. I'm looking for some insight on the best way to model this: Currently there is a...
Taylor Cooney postedWhat am I missing please? class Choice < ApplicationRecord belongs_to :choiceable, polymorphic: true belongs_to :room_item, optional: false end create_table "choices", force: :cascade do...
jason Mardell postedAny ?
Boris Bresciani replied • SolvedHello Chris, I am only using Puma or Passenger, definitely not both at the same time. When using Puma I start the rails server (i.e rails s -e production) from the application directory and the pag...
William Jones replied • SolvedHi, I'm trying to make master-slave replication(One master(write/read) and one slave(read only)) for my database(mysql 8 / rails 4.2). I researched whole day but I'm still considering which gem is ...
Sean postedI was using postgres database. Changed wal_level to replica, & turned on archive_mode. Then it started generating wal files, which I used to restore to point in time recovery.
Nithil replied • SolvedYour `Bet` model would have two `belongs_to` associations (one for the creator and one for the backer or however you'd like to call them): ``` class Bet < ApplicationRecord belongs_to :creato...
Nicholas Bayley replied • SolvedHi, I was wondering if anyone has some experience building a store credit system into a market place style app. Eg: Users could purchase 100USD in adavance and receive 120USD in store credits as in...
gafemoyano postedHey Chris, I found the solution. https://github.com/jbox-web/ajax-datatables-rails/blob/master/doc/migrate.md I used the old methods... Thanks for your help! and support!
Victor Nizeyimana replied • SolvedI believe you should consider to read this before migrate to the multi tenant way. https://influitive.io/our-multi-tenancy-journey-with-postgres-schemas-and-apartment-6ecda151a21f
Ary Rabelo replied • SolvedHi, I'm new to ROR. The query I created below is functioning properly. I'm trying to prepare an interrogation. But I didn't succeed. The query is as follows; @rad_check.tenant_id = SELECT groupn...
Emrah Yıldırım postedSeems like this is more an Shrine.rb problem, i adressed that on SO aswell: https://stackoverflow.com/questions/52464556/after-capistrano-deploy-my-images-uploaded-via-shrine-arent-displayed-anymo...
Sebastian repliedIf I wanted to have a "user_type" column in my "users" table that references to another table called "user_type", how do I write the correct association in rails? For example if my user_type is 1 a...
Arzee postedAs Solomon David said MongoDB is one of the NoSQL database. Currently there are 150 of them (NOSQL Databases). It falls into the document store category. These categories are defined based on archi...
saravanagumar repliedHi I am trying to create for example a contact model but currently i only know of for example first name, last name and email but would want to give the user a choice of entering more custom f...
Anand Duddella postedDepending on wether you want to keep running the PHP app. If you don't, read into ActiveRecord, create your models and then write a few migrations to make sure the columns and indexes do match the ...
Thomas R. Koll repliedI've always wondered if there is a better way to help database query performance in rails by breaking up tables with lots of columns? Any recommendations would be appreciated.Does it make more sens...
Javid Freeman postedHey Simon, Thanks for your answer! Never actually thought of it that way. Come to think of it, it makes the most sense. Cheers!
Ariff Munshi replied • Solved