config/routes.rb in e9_crm-0.1.26 vs config/routes.rb in e9_crm-0.1.27
- old
+ new
@@ -1,11 +1,12 @@
Rails.application.routes.draw do
crm_path = 'admin/crm'
- get '/autocomplete/contacts' => E9Crm::Rack::ContactAutoCompleter
- get '/autocomplete/companies' => E9Crm::Rack::CompanyAutoCompleter
- get '/users/email_test.json' => E9Crm::Rack::EmailAvailabilityChecker
+ get '/autocomplete/contacts' => E9Crm::Rack::ContactAutoCompleter
+ get '/autocomplete/companies' => E9Crm::Rack::CompanyAutoCompleter
+ get '/autocomplete/email_campaigns' => E9Crm::Rack::EmailCampaignAutoCompleter
+ get '/users/email_test.json' => E9Crm::Rack::EmailAvailabilityChecker
scope :module => :e9_crm do
resources :offers, :as => :public_offer, :only => :show do
resources :leads, :as => :deals, :only => [:new, :create], :path => ''
end
@@ -16,40 +17,32 @@
# user api, which crm needs to check for email uniqueness errors
resources :users, :only => :new
resources :companies, :except => :show
resources :contacts do
- # page_views currently not routed, but near working
- #resources :page_views, :path => 'activity', :only => :index
-
collection { get :templates }
member do
post :upload_avatar
delete :reset_avatar
end
end
+ resources :page_views, :path => 'activity', :only => :index
+
resources :deals
- # contact_emails are generated by email templates, and end up in the sent emails list
- resources :contact_emails, :except => [:index, :show]
- resources :email_templates do
- collection { get :select }
- end
-
resources :dated_costs, :path => 'advertising_costs', :only => [:index] do
collection do
post :bulk_create
end
end
resources :campaigns, :only => [:index, :destroy, :new] do
- # page_views currently not routed, but near working
- #resources :page_views, :path => 'activity', :only => :index
+ resources :visits, :path => 'activity', :only => :index
end
scope :path => :campaigns do
- #get '/activity', :to => redirect("/#{crm_path}/campaigns/all/activity")
+
resources :campaign_groups, :path => 'groups', :except => [:show]
resources :sales_campaigns, :path => 'sales', :except => [:show, :index]
resources :affiliate_campaigns, :path => 'affiliate', :except => [:show, :index]
resources :email_campaigns, :path => 'email', :except => [:show, :index]
@@ -77,10 +70,9 @@
campaigns/affiliate
campaigns/email
campaigns/sales
campaigns/groups
deals
- email_templates
menu_options
offers
).each do |path|
get "/#{path}/:id", :to => redirect("/#{crm_path}/#{path}/%{id}/edit"), :constraints => { :id => /\d+/ }
end