Last updated: May 2, 2026
SparkMap ("the App") is a mind-mapping application developed by Hoa Nguyen. This privacy policy explains how the App handles your information.
| require 'marcel' | |
| require 'memory_profiler' | |
| require 'benchmark/ips' | |
| puts "Memory stats for requiring mini_mime" | |
| result = MemoryProfiler.report do | |
| require 'mini_mime' | |
| end | |
| puts "Total allocated: #{result.total_allocated_memsize} bytes (#{result.total_allocated} objects)" |
| return ( | |
| <Formsy.Form ref={(form) => {this.formsyForm = form;}} onSubmit={(model) => { onSubmit(model); }} onValid={this.enableButton} onInvalid={this.disableButton}> | |
| <Dialog | |
| title="Tạo bill mới" | |
| actions={actions} | |
| open={selectedBill.editing} | |
| > | |
| <BillInput name='bill[full_name]' isSmall={true} required label="Họ Tên" value={selectedBill.full_name} validations="isExisty" errorMessage="Điền họ tên vào nhé người đẹp"/> | |
| <BillPhoneNumberInput name='bill[phone_number]' isSmall={true} label="Số điện thoại" value={selectedBill.phone_number} required validations="maxLength:13" validationError="Số ĐT tối đa 11 số"/> | |
| <BillAddressInput name='bill[ship_address]' label="Địa chỉ" value={selectedBill.ship_address} requied/> |
| config.action_mailer.smtp_settings = { | |
| address: 'smtp.gmail.com', | |
| port: 587, | |
| domain: ENV['MAIL_DOMAIN'], | |
| user_name: ENV['MAIL_ID'], | |
| password: ENV['MAIL_PASSWORD'], | |
| authentication: 'plain', | |
| enable_starttls_auto: true } |
| def send_message(cart) | |
| message = "\nYour order:\n" | |
| cart.orderlines.each do |orderline| | |
| message += "* #{orderline.food.name} x #{orderline.quantity} - price: $#{orderline.unit_price}\n" | |
| end | |
| message += "\nTotal value: #{cart.orderlines.sum(:unit_price)}" | |
| @client = Twilio::REST::Client.new ENV['TWILIO_SID'], ENV['TWILIO_TOKEN'] | |
| @client.messages.create( | |
| from: ENV['TWILIO_TEL'], | |
| to: phone, |