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
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> |
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
<<<<<<< HEAD | |
ActiveRecord::Schema.define(version: 20190823010742) do | |
======= | |
ActiveRecord::Schema.define(version: 20190808011150) do | |
>>>>>>> master | |
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
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 |
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 @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') |
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).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 = ""; |
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
// @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'; |
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
describe('EditFieldContainer', () => { | |
let utils; | |
describe('user has permission to edit', () => { | |
beforeEach(() => { | |
utils = render( | |
<div data-testId="outside"> | |
<MockedProvider mocks={{}} addTypename={false}> | |
<EditFieldContainer {...props} /> | |
</MockedProvider> |
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
devise_for :users, | |
path: :vendor, | |
path_names: { sign_in: 'login', sign_out: 'logout' }, | |
controllers: { invitations: 'vendors/invitations' } |
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 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 |
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
export const filterByIds = <T>(items: Object[], ids: string[]): T[] => | |
items.filter(item => ids.includes(item.id)); |