User.where(:role => :admin).order(:username).pluck(:email) #=> [[email protected], [email protected]]
Heroku Mailer (SendGrid) configuration steps
-
Go to your heroku application.
-
Add SendGrid addons
-
Config STMP settings to your config/environment.rb
ActionMailer::Base.smtp_settings = {
get gemset list
rvm gemset list
empty gemset
rvm getmset empty [gemset_name]
= simple_form_for @time_slot, url: booking_path, method: :patch do |f|
= f.input :start_time, :as => :datetime, :minute_step => 30, :include_seconds => true, :discard_year => true, :datetime_separator => ' — ', :time_separator => ' - '
= f.input :id, as: :hidden
= f.submit "Book this slot", class: 'btn'
Setup a WYSIWYG editor with CKEditor. Includes instruction for Rails_Admin
- Add
gem 'ckeditor'
to your Gemfile and bundle - Checkout https://github.com/galetahub/ckeditor for instruction to generate the correct model to generate for uploading of files (eg. ActiveRecord + Paperclip)
- Run
rake db:migrate
- Add
//= require ckeditor/override
in your application.js (before require_tree .)
To configure the editor to be used in Rails_Admin, follow this https://github.com/sferik/rails_admin/wiki/CKEditor
- Star Rating with only CSS
<div class="star-wrapper">
<a class="star" href="javascript:alert(1)"></a>
<div class="star-wrapper">
<a class="star"></a>
<div class="star-wrapper">
<a class="star"></a>
<div class="star-wrapper">