python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Finding in array of active record results
I am using active record to create array.
users = User.all.to_a
now I want to later on find with in this array user id: 1
users.find(1)
but it is not giving result but returning everything. How can ...
shahidkamal
Votes: 0
Answers: 2
If I make a Thread in a controller action, do I need to wrap the inner code in an executor?
I have a controller action where I make a thread with Thread.new.
Do I need to wrap the inner code with an executor?
I think this part of the docs is saying I should "if your application manually...
John Bachir
Votes: 0
Answers: 0
PG::UndefinedFunction when calling from Active Record
I am using ruby 2.2.6 and rails 4.1.16, with pg as database.
I am getting the PG::UndefinedFunction: ERROR : Operator does not exist. timestamp without time zone > time without time zone.
I know th...
Farr
Votes: 0
Answers: 1
How to order users by the number of user's posts in a particular category
I have 3 models,
User (has_many :posts)
Post (Belongs_to :user, has_many :categories through: :posts_categories)
Category (has_many :posts through: :posts_categories)
Now, I want to find and order a...
HighOnRails
Votes: 0
Answers: 0