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 XeroFixedAssets | |
include Xeroizer::Http | |
include Xeroizer::ApplicationHttpProxy::InstanceMethods | |
def initialize(xero_client) | |
@xero_client = xero_client | |
end | |
def url | |
"https://api.xero.com/assets.xro/1.0" + '/' + "Assets" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML, CSS and JavaScript Demo</title> | |
</head> | |
<body> | |
<h1>HTML, CSS and JavaScript Demo</h1> | |
<!-- Paragraph and anchor tag section --> | |
<div> |
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
feature "create a todo list" do | |
it "should create one todo list" do | |
visit "/todo_lists/new" | |
expect(page).to have_http_status(:success) | |
expect(page).to have_text("Create New Todo List") | |
fill_in "Title", with: "School Work" | |
fill_in "Description", with: "List of projects / readings to do" | |
click_button "Create Todo List" |
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 PdfController < ApplicationController | |
def export | |
location = "Singapore" | |
event = "Jay Chou World Tour Concert Singapore 2017" | |
raw_svg = '<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="300" height="150" viewBox="0 0 300 150" xml:space="preserve"> | |
<desc>Created with Fabric.js 1.7.19</desc> |
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 status_validations | |
rules = THE_RULES[self.event.status] | |
unless rules.nil? | |
errors.add(:status, 'Invalid update of Event Seat due to the current event status.') unless rules[status_was.to_sym].include? status | |
end | |
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
money_fields = $('input[data-role=money]'); | |
money_fields.autoNumeric('init', { | |
aSep: ',', | |
aDec: '.', | |
mDec: '0', | |
vMin: '0', | |
vMax: '9999999999' | |
}); | |
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
desc "Create fake order to test actual ticket" | |
task populate_fake_order: :environment do | |
event = Event.first | |
event_seat_category = event.event_seat_categories.first | |
event_seat = event.event_seats.first | |
# Update Event Seat | |
event_seat.update(event_seat_category_id: event_seat_category.id, | |
section: "200", | |
row: "A", |
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
import React from 'react'; | |
import request from 'superagent'; | |
import { compose, withState, withHandlers, lifecycle } from 'recompose'; | |
const Dashboard = (props) => { | |
const { winnie, onSubmit, users } = props; | |
return ( | |
<div> | |
<div>This is Dashboard - {winnie}</div> | |
<button onClick={() => onSubmit()}>Click Me</button> |
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
import React from "react"; | |
import { graphql } from "react-apollo"; | |
import { compose } from "recompose"; | |
import { someQuery } from "SOMEPATH"; | |
export const VersionNumber = ({ data: { config: { version } } }) => ( | |
<div> | |
v{version} | |
</div> |
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
import React from "react"; | |
import { mount } from "enzyme"; | |
import renderer from "react-test-renderer"; | |
import { setMockGraphQLProps, setMockGraphQLErrorProps } from "react-apollo"; | |
import AdminListComposer from "../../../bundles/admin/composers/AdminListComposer"; | |
const EmptyComponent = () => null; | |
const EnhancedComponent = AdminListComposer(props => ( | |
<EmptyComponent {...props} /> | |
)); |
OlderNewer