-
In your UsersController, you have too much logic in there. You want controller actions to be a few lines at most. Try moving all the twitter and google stuff out into the models or to other objects …
mikel updated
10 years ago
-
https://api.rubyonrails.org/classes/ActiveRecord/Calculations.html#method-i-count
`Person.count` returns an Integer
`Article.group(:status, :category).count` returns a hash of type `T::Hash[Stri…
-
Not suported version 4.0.x Redmine
-
### Summary:
I was in the middle of an upgrade to the latest stable release and during migrations, I encountered the following errors:
```
root@ip-172-31-21-71:/var/www/canvas# RAILS_ENV=produc…
-
I know Rails support is only partial at the moment, but I have installed the Solargraph gem, and am using the VSCode extension, and when I am in a Rails application, I am not getting any Rails-related…
-
Strictly speaking we're using Zoho as an alternative data source for models that would typically be stored using `ActiveRecord`. This plugin has great promise of course but at present it treats all fi…
-
Basically it will take the relation name, the ids to set and will insert/delete from the database accordingly.
Here is the code I am using on my ActiveRecord
``` php
/**
* @param array $ids
* @pa…
-
Hello,
we noticed some inconsistent data in our database and came to the conclusion that data created within an `after_create` hook is not always present.
Our audit tool hooks itself into some of …
-
Unfortunately my `AdminUser` class is not recognized as a MTI class. :(
I'm running Rails 4.2.10 and this is my setup:
```ruby
ActiveRecord::Migration.create_table :users do |t|
t.string :firs…
-
### Problem this feature will solve
Having `FactoryBot.automatically_define_enum_traits` default to true is useful when using `ActiveRecord::Enum` to get up and running with factories quickly. Howe…