Skip to content

Instantly share code, notes, and snippets.

View UnlimNET's full-sized avatar

Alexander Kravchenko UnlimNET

View GitHub Profile
# frozen_string_literal: true
class UsersMailerPreview < ActionMailer::Preview
def password_updated_email
UserMailer.password_updated(User.first, http_request_details)
end
private
def http_request_details
@UnlimNET
UnlimNET / image-2x.less
Created March 16, 2016 14:42 — forked from fatuk/image-2x.less
LESS retina image mixin
// Retina img
// EXAMPLE: .image-2x('../img/icon_phone.png');
.image-2x(@image, @repeat: no-repeat) {
@width: image-width(@image);
@height: image-height(@image);
@filename : ~`/(.*)\.(jpg|jpeg|png|gif)/.exec(@{image})[1]`;
@extension : ~`/(.*)\.(jpg|jpeg|png|gif)/.exec(@{image})[2]`;
background-image: ~`"url(@{filename}.@{extension})"`;
background-repeat: @repeat;
width: @width;