Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Fixes #12994 - Rails 4 compatibility #34

Merged
merged 1 commit into from
Jan 25, 2016
Merged

Conversation

dLobatog
Copy link
Member

@dLobatog dLobatog commented Jan 8, 2016

I also removed lib/tasks, /config and /test as they were completely unused.

@orrabin
Copy link
Member

orrabin commented Jan 14, 2016

@dLobatog shouldn't the required foreman version change with these changes? it's still requires_foreman '>= 1.9'.
This has an issue: http://projects.theforeman.org/issues/12994 so can you please change the commit message to match it?

@@ -11,7 +11,7 @@

templates.each do |template|
template[:template] = File.read(File.join(ForemanChef::Engine.root, "app/views/foreman/unattended", template.delete(:source)))
ProvisioningTemplate.find_or_create_by_name(template).update_attributes(defaults.merge(template))
ProvisioningTemplate.where(:name => template).first_or_create.update_attributes(defaults.merge(template))
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't work for me:
PG::Error: ERROR: missing FROM-clause entry for table "name" LINE 1: ...templates"."type" IN ('ProvisioningTemplate') AND "name"."na...
using template[:name] instead of template fixed it.

@ares
Copy link
Member

ares commented Jan 18, 2016

@dLobatog any chance, you'll get to Ori's comments?

@dLobatog dLobatog changed the title Rails 4 compatibility Fixes #12994 - Rails 4 compatibility Jan 18, 2016
@dLobatog
Copy link
Member Author

@orrabin @ares Latest update changed:

  • commit title to reference the issue #12994
  • db seed according to @orrabin 's comments.

I didn't update the requires_foreman because all changes are backwards compatible with Rails 3.

@ares
Copy link
Member

ares commented Jan 25, 2016

Great, so foreman_chef is compatible with latest Foreman again! Thank you @dLobatog and @orrabin!

ares added a commit that referenced this pull request Jan 25, 2016
Fixes #12994 - Rails 4 compatibility
@ares ares merged commit d9fee59 into theforeman:master Jan 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants