foremancommunity-templatesforeman_api
Fixes #12132 - [API] Host all parameters should include host parameters
Fixes #12241 - Correct counter_cache deadlock fix
Previous fix had a bug - in `:after_commit` `self.changes` is empty, and thechanges are in `self.previous_changes`. Also this only needs to run onupdate.This commit adds tests to make sure cached_counters continue to work...
fixes #11965 - hostgroup with config group - clone should not run validations more than once
Fixes #11924 - Substitute .scoped by .where(nil) to force return relation
On Rails 4 .scoped is deprecated. Calling .all on the model returns theequivalent ActiveRecord relation object on Rails 4, but on Rails 3 itreturns an Array right away.
A proper replacement we can use is where(nil) - it's ugly but it returns...
fixes #12109 - removing owner_id presence validation
in rails 4, owner is not populated when creating a join model(user.roles << role created a UserRole on the background)in rails 3, this is not a problem, in rails 4, the presence validationfails because no owner_id exists nor does an owner exist. at that...
fixes #12207 - objects with ancestors should not call ancestors if cached
up until now, ancestry objects always called their ancestors whenlinking to the object because to_param called get_title instead of title(which can be cached)this caused a LOT of pointless queries, slowed down Hosts#index alot
fixes #11345 - API GET request available_clusters sends empty hash
Fixes #12004, #11999 - Remove reserved words from Environment friendly_id
Restores use of friendly_id, but removes 'new', 'edit' etc from thereserved words list to ensure they can be used as identifiers.
Reverts the id-name parameterization to purely name, which fixes...
refs #12147 - adding permissions setter to roles
Problem
Calling FactoryGirl.build(:role, :permissions => []) needs a setterdirectly on role. Otherwise it fails on Rails 4 with:ActiveRecord::HasManyThroughNestedAssociationsAreReadonly: Cannot modify...
refs #12147 - adding safety guards to method_missing on compute attributes
There's no need to pass to vm_atts when the method is a setter, also,there's no need to pass if vm_attrs is blank. Those safety guards arerequired in rails4, and compatible with 3.
View revisions
Also available in: Atom