Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rahuldstiwari's full-sized avatar

Rahul Tiwari rahuldstiwari

  • Ruby on rails and Shopify Application Developer
  • Jaipur, Rajasthan
View GitHub Profile
@rahuldstiwari
rahuldstiwari / routes.rb
Created October 16, 2018 05:02
Devise authenticated routes in rails
resources :users
devise_for :users, controllers: { sessions: 'users/sessions',registrations: 'users/registrations' ,passwords: 'users/passwords' }
devise_scope :user do
unauthenticated :user do
root :to => "users/sessions#new"
end
authenticated :user do
root :to => 'dashboard#index', as: :authenticated_path
Add HTML Wrapper in page
<div class="loading">Loading&#8230;</div>
===============================================================================================
Add CSS
===============================================================================================
/* Absolute Center Spinner */
.loading {
@rahuldstiwari
rahuldstiwari / Reflect flexslider image on shopify product page
Created March 14, 2018 10:19
This is project specific code, just for record.
<script type="text/javascript">
function Imagw(thisvalue) {
var slideshow = $('#slider-product-template-2');
theme.slideshows[slideshow] = new theme.Slideshow(slideshow);
// slideshow.flexslider(6);
var $newImgs = slideshow.find(
'.slide[data-img-alt="' + thisvalue + '"]'
);
http://railscasts.com/episodes/165-edit-multiple?view=asciicast
http://viralpatel.net/blogs/multiple-checkbox-select-deselect-jquery-tutorial-example/
@rahuldstiwari
rahuldstiwari / git.txt
Created December 2, 2016 04:27
Gems and resouces you can try for email campaign
http://stackoverflow.com/questions/30221340/allow-user-to-create-custom-email-template-for-actionmailer-in-rails
https://github.com/code-and-effect/effective_email_templates
http://jejacks0n.github.io/mercury/
https://github.com/glebm/rails_email_preview
rails create module
create a file in lib/foo.rb and put
module Foo
def self.hello
puts "ohohohohhhohohohoh"
end
end