This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mongo_template.rb | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/controls.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/prototype.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def copy | |
@account_profile = AccountProfileTemplate.find(params[:based_on]) | |
@account_profile = AccountProfileTemplate.new(@account_profile.attributes.merge(:name => params[:name])) | |
respond_to do |format| | |
if @account_profile.save | |
flash[:notice] = "The Account Profile has been copied" | |
format.js{redirect_to admin_account_profiles_path} | |
else | |
flash[:notice] = "The Account Profile has NOT been copied" | |
format.js{redirect_to admin_account_profiles_path} |
NewerOlder