examples/api-samples/samples/sample22.rb in groupdocs-1.5.0 vs examples/api-samples/samples/sample22.rb in groupdocs-1.5.1
- old
+ new
@@ -14,11 +14,11 @@
set :last_name, params[:last_name]
begin
# check required variables
- raise "Please enter all required parameters" if settings.client_id.empty? or settings.private_key.empty? or settings.fileId.empty? or settings.email.empty? or settings.first_name.empty? or settings.last_name.empty?
+ raise 'Please enter all required parameters' if settings.client_id.empty? or settings.private_key.empty? or settings.fileId.empty? or settings.email.empty? or settings.first_name.empty? or settings.last_name.empty?
# create new user
user = GroupDocs::User.new
user.primary_email = settings.email
user.nickname = settings.first_name
@@ -46,7 +46,7 @@
rescue Exception => e
err = e.message
end
# set variables for template
- haml :sample22, :locals => { :userId => settings.client_id, :privateKey => settings.private_key, :fileId => settings.fileId, :email => settings.email, :first_name => settings.first_name, :last_name => settings.last_name }
+ haml :sample22, :locals => {:userId => settings.client_id, :privateKey => settings.private_key, :fileId => settings.fileId, :email => settings.email, :first_name => settings.first_name, :last_name => settings.last_name, :err => err}
end