Skip to content

Instantly share code, notes, and snippets.

View ralfting's full-sized avatar
🏠
Working from home

Ralph Effting ralfting

🏠
Working from home
  • Finbits
  • Palhoça - SC
View GitHub Profile
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<<<<<<< HEAD
ActiveRecord::Schema.define(version: 20190823010742) do
=======
ActiveRecord::Schema.define(version: 20190808011150) do
>>>>>>> master
def presentation_video_player
return unless object.presentation_video.present?
aws_key = "#{object.id}/#{object.presentation_video.file}"
url = AwsUtils::download_url(Rails.configuration.app['aws']['buckets']['lessons']['name'], aws_key)
h.video_tag url, controls: true, autoBuffer: true, width: '50%'
end
- if @course.to_whom_description.present?
h2.course__subtitle Para quem serve?
div.build-list-js data-read-more="true"
= @course.to_whom_description('product__text-content')
$(document).ready(function() {
'use strict';
const $textBuildList = $('.build-list-js > p');
const templateLi = text => `<li>${text}</li>`;
const stringToArray = paragraph => paragraph.split('\n');
$textBuildList.each(function textToList(index, text) {
const arrText = stringToArray(text.innerText);
let listHtml = "";
// @flow
import * as React from 'react';
import cn from 'classnames';
import { handleErrorMessages } from '../../../utils/noty';
import { t } from '../../../utils/I18n';
import { TextField } from 'pipestyle';
import Base from '../../Base';
import { ESCAPE_KEY, DELAY_TO_CONFIRM_FIELD } from '../../constants';
describe('EditFieldContainer', () => {
let utils;
describe('user has permission to edit', () => {
beforeEach(() => {
utils = render(
<div data-testId="outside">
<MockedProvider mocks={{}} addTypename={false}>
<EditFieldContainer {...props} />
</MockedProvider>
devise_for :users,
path: :vendor,
path_names: { sign_in: 'login', sign_out: 'logout' },
controllers: { invitations: 'vendors/invitations' }
if already_on_cart
redirect_to checkout_path
# return render js: "toastr.warning('Este item já está em seu carrinho de compras.')"
elsif user_signed_in? && current_user.owns?(@product)
return render js: "toastr.warning('Aparentemente você já adquiriu este item.')"
else
@shopping_cart.add(@product, @product.cost)
end
export const filterByIds = <T>(items: Object[], ids: string[]): T[] =>
items.filter(item => ids.includes(item.id));