some minor things in rails

  1. For Date format .utc.strftime('%d-%m-%Y %H:%M:%S')
  2. Alternative to html_safe (raw("<strong class='text-danger'>Decline</strong")).
  3. select tag for form_for <%= f.select(:currency_id, options_for_select(@currencies.map{|x| x.id}, f.object.payment_currency), {include_blank: "Select Currency"}, { :class => 'form-control', required: true }) %>
  4. zip -r new_file_name.zip folder_name

Comments

Popular posts from this blog

Wicked-PDF not showing images, 'wicked_pdf_image_tag' undefined

DmL command || Sql Tutorial -7