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
# Rails Editor | |
- Point 1 | |
- SubPoint B | |
- Point 2 | |
- Subpoint D | |
- Point 3 | |
[link to Facebook!](https://facebook.com) |
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
if paperclip_cfg = YAML.load_file("#{Rails.root}/config/paperclip.yml")[Rails.env] | |
paperclip_cfg.symbolize_keys! | |
Paperclip::Attachment.default_options.merge!(paperclip_cfg) | |
end |
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
https://codepen.io/lbebber/pen/rawQKR | |
https://codepen.io/Manoz/full/pydxK | |
https://codepen.io/anon/pen/ejpYwR |
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
class SendgridWebMailer < ActionMailer::Base | |
require 'sendgrid-ruby' | |
include SendGrid | |
require 'json' | |
def initialize | |
@client = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY']).client | |
end | |
def send_marketting_email(candidate) |
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
require 'faker' | |
qp = QuestionPaper.new | |
qp.name = "QP-Test-React-Exam" | |
qp.save | |
4.times do | |
s = qp.sections.new | |
s.name = Faker::GameOfThrones.city | |
s.save |
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
Mega Menu Codes | |
https://www.codeply.com/go/vZBG452NGf/bootstrap-4-megamenu |
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
$(document).on('turbolinks:load', function() { | |
console.log("may i come") | |
if ( $(".quantity").length > 0 ) { | |
updateQuantity(); | |
}; | |
}); | |
updateQuantity = () => { | |
$(".quantity").bind('keyup change click mouseup', function() { | |
const quantity = $(".quantity").val(); |
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
class AssociatesController < ApplicationController | |
before_action:authenticate_user! | |
def new | |
@associate= params || {} | |
@associate=Associate.new() | |
end | |
def index | |
if current_user[:role]=="associate" |
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
Rails.application.routes.draw do | |
scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do | |
root to: 'associates#index' | |
end | |
devise_for :users | |
get 'welcome/index' | |
# patch 'associates/update' | |
get 'accept_request', to: 'associates#accept_request' | |
get 'cancel_request', to: 'associates#cancel_request' |
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
<div class="navbar navbar-default navbar-static-top"> | |
<div class="container"> | |
<div> | |
<a class="navbar-brand" href="#" >Associate-Manager Interaction Portal</a> | |
<!-- <a class="navbar-brand" href="/"> --> | |
<!-- <a class="navbar-brand" | |
<%# <%= content_tag :li do %> | |
<%# <%= link_to 'Switch to English', locale: :en %> %> | |
<%# <% end unless current_page?(locale: :en) %> %> | |
<%# <%= content_tag :li do %> %> |
OlderNewer