Search Results for "advanced-activerecord-queries"

Lessons














Forum Threads

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

Rails Counter Caches Discussion

16
General
I feel this video was cause of me in the forum haha!A+++
Ted Will replied

Searchkick: Reindex on model in multitenancy through default scope app

28
General
Has anyone had any success indexing their multitenant data with searchkick? I followed the suggested article in the readme (https://www.tiagoamaro.com.br/2014/12/11/multi-tenancy-with-searchkick/) ...
Chris Oliver replied

Sortable Drag and Drop Discussion

29
General
Just a heads up, in your Gemfile, bootstrap 4 beta no longer uses tether for tooltips, now uses popper.js which is now a dependency of the bootstrap 4 gem
robert replied

How does Searchkick/ElasticSearch impact how I should structure my database indexes?

1
Gems / Libraries
I have a couple of questions about implementing Searchkick and ElasticSearch in general. * Let's say I'm using ElasticSearch to search for products like so: ``` # usage Product.search "apples", fi...
Mark Doerr replied

How can I squish SQL for log tidiness (automatically)?

3
Rails
Hello everyone, I’m dealing with a challenge in my codebase where there are numerous multiline SQL heredocs being logged. While these may be helpful for local debugging, they become a hassle when ...
Simon Deis replied

Improve performance of simple searching method

1
Rails
Hi,I have been building an app these days. The functionality is nothing fancy at all, I have to connect to a client's SOAP webservice, fetch some data, save it into my pg database and build a searc...
Ernesto Gimeno replied

Exporting Records To CSV Discussion

58
General
Is there some magic happening when you call @users.to_csv ?? As I understand @users is an ActiveRecord::Relation, how is the method 'to_csv' sended to the User class ??
Nathan Anderson replied

Should scopes be seperated out to allow chaining or be specific to the what you are trying to do?

4
Rails
I am trying to write an internal tender application and am having trouble figuring out the best approach for writing a scope. I have the following models ``` class Tender < ApplicationRecord ...
Jacob Montgomery replied

Liking Posts Discussion

96
General
Learned a lot of new things through this post, thank you. Never knew how to properly write a route to a module or the proper architecture for that set up. Very useful stuff. Would have liked to s...
Someone replied

Comments With Polymorphic Associations Discussion

98
General
Awesome Video. I really liked and refreshed my concepts about Polymorphic Associations. Thanks :)
Karl McCollester replied

A video about ActiveRecord Association is missing

1
Site Feedback
Hi firstable i want to thank you about this rich content website , you push me to the more advanced rails dev I have suggestion why not doing a video explain the ActiveRecord Association and it's...
Chris Oliver replied

Can I 'alias' a Rails active model to another class

9
General
First off I am sure I am not asking this question correctly as this is an advanced Rails topic over my head right now. Here is what I have for routes: concern :assetable do resources :ass...
Chris Oliver replied
Solved

API Authentication with an OAuth Provider Discussion

41
General
Awesome! Can't wait to see the next videos!
Jeremy Bray replied

Need some help with an Active Record Query

6
Rails
HiI have these tables:Users which has many:Farms which has many:StoresI want to return stores that belong to a specific user_id.Got this far but Rails is giving me an error.Thanks in advance for an...
Simon P replied
Solved

Help with Modelling the Rails DB/ActiveRecord

0
General
I want to have a data structure as follows; Items Category contains general information on that category whether it can be taken on a flight. Items contain more specialized information on the item...
Senaru posted

Advanced Messaging with Mailboxer: Mark As Read Discussion

8
General
Freaking Love it Chris your on point all the time! love it love it. Thank you has always.
Carl Tanner replied

Working with ActiveRecord and Google Cloud Firestore

1
Rails
I'm pretty new to Rails, and I was wondering what the "right" way of architecting a small app would be given the following scenario. Users create Rooms, then from there add to them a number of refe...
Jordan T-H replied
Solved

How to validate model attribute

0
Rails
Hello everyone, question. I have the following code: class Country < ActiveRecord::Base has_many :cities, dependent: :destroy accepts_nested_attributes_for :cities end class City < Act...
Harris Mariano posted

How to create a minitest fixture for a non database model?

1
Testing
Hi! Is there a way to create a fixture for a model that is not in the database? I built my app a few years back following a guide in which the Plans were loaded from a YML file and instantiated as...
Simon Moro replied
Solved