VRFS-1576 fixing redirect paths to use active_admin_template

This commit is contained in:
Jonathan Kolyer 2014-04-23 06:39:49 +00:00
parent 7b2d124b33
commit a7d83064df
3 changed files with 10 additions and 3 deletions

View File

@ -116,3 +116,7 @@ group :test do
gem 'simplecov-rcov'
end
gem 'pry'
gem 'pry-remote'
gem 'pry-stack_explorer'
gem 'pry-debugger'

View File

@ -41,7 +41,8 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
obj.partner_name = vals[:partner_name]
obj.user_email = vals[:user_email] if vals[:user_email].present?
obj.save!
redirect_to admin_affiliates_path
set_resource_ivar(obj)
render active_admin_template('show')
end
end

View File

@ -97,12 +97,14 @@ ActiveAdmin.register JamRuby::EmailBatch, :as => 'Batch Emails' do
def create
batch = EmailBatch.create_with_params(params[:jam_ruby_email_batch])
redirect_to admin_batch_email_path(batch.id)
set_resource_ivar(batch)
render active_admin_template('show')
end
def update
resource.update_with_conflict_validation(params[:jam_ruby_email_batch])
redirect_to admin_batch_email_path(resource.id)
set_resource_ivar(resource)
render active_admin_template('show')
end
end