Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created March 26, 2015 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/d56058f398d73978c013 to your computer and use it in GitHub Desktop.
Save tenderlove/d56058f398d73978c013 to your computer and use it in GitHub Desktop.
diff --git a/vmdb/app/views/ems_cloud/new.html.haml b/vmdb/app/views/ems_cloud/new.html.haml
index 4752693..62a40f9 100644
--- a/vmdb/app/views/ems_cloud/new.html.haml
+++ b/vmdb/app/views/ems_cloud/new.html.haml
@@ -1 +1,2 @@
-= render :partial => "shared/views/ems_common/form"
+= form_for(@ems) do |f|
+ = render :partial => "shared/views/ems_common/form"
diff --git a/vmdb/config/routes.rb b/vmdb/config/routes.rb
index 8671d42..632fe8e 100644
--- a/vmdb/config/routes.rb
+++ b/vmdb/config/routes.rb
@@ -464,18 +464,13 @@ Vmdb::Application.routes.draw do
dialog_load
discover
download_data
- edit
- index
- new
protect
- show
show_list
tagging_edit
) +
compare_get,
:post => %w(
button
- create
dynamic_checkbox_refresh
dynamic_list_refresh
dynamic_radio_button_refresh
@@ -1885,6 +1880,8 @@ Vmdb::Application.routes.draw do
match '/api/*suffix' => 'api#update', :format => 'json', :via => [:post, :put, :patch]
match '/api/*suffix' => 'api#destroy', :format => 'json', :via => [:delete]
+ resources :ems_cloud
+
CONTROLLER_ACTIONS.each do |controller_name, controller_actions|
# Default route with no action to controller's index action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment