Skip to content

Rails5.0.2#759

Merged
jtwohiou merged 6 commits into
masterfrom
rails5.0.2
May 12, 2017
Merged

Rails5.0.2#759
jtwohiou merged 6 commits into
masterfrom
rails5.0.2

Conversation

@jtwohiou
Copy link
Copy Markdown
Collaborator

No description provided.

model_params = params[model_form_name]
defaults.merge(model_params)
defaults.merge(model_params.to_unsafe_h)
end
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be revisited

filtered_params.delete(:controller)
filtered_params.merge!(:order => determine_order(filtered_params[:order], column_to_sort))
polymorphic_path(engine_aware_path(content_type.model_class), filtered_params)
polymorphic_path(engine_aware_path(content_type.model_class), filtered_params.to_unsafe_h)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be revisited.

Given I am logged in as a Content Editor
And I view that Find Content Portlet in the page editor
Then I should see the content loaded by that Portlet

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should find a way to get this test back in.

Comment thread features/support/env.rb
#
ActionController::Base.allow_rescue = false
$arel_silence_type_casting_deprecation=true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short term fix for arel deprecation warnings, will need to be revisited when creating the next bump.


# Doing the SQL ourselves to avoid callbacks
ActiveRecord::Base.connection.execute(self.class.unscoped.where(self.class.arel_table[self.class.primary_key].eq(id)).arel.compile_update(quoted_attributes, id).to_sql)
my_class.where(:id=>id).update_all(update_params)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing lots of deprecation warnings so I moved it to active record. The update_all should avoid callbacks on the model.

@jtwohiou jtwohiou merged commit 15e7305 into master May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant