Skip to content

Instantly share code, notes, and snippets.

View cleitonfco's full-sized avatar

Cleiton Francisco cleitonfco

View GitHub Profile

AbrilPro Ruby

SOA from the Start - Workshop Part


What will we show

We are building a set of applications that have will show deals (aka. 'inventory items') available in or near a given city. These items can also be organized by a 'category' (aka. tags), to cater to the various customers' areas of interest.

To bootstrap things, and to get us focussed on some key areas of developing in a SOA, we have gone ahead and built these apps out at varying stages. The workshops will focus on showing some of this code, and intersperse exercises to add features, or to refactor.

class Followings < ActiveRecord::Base
attr_accessible :user_id, :follower_id
belongs_to :user
belongs_to :follower, class_name: 'User'
belongs_to :following, class_name: 'User', foreign_key: :user_id
validates_uniqueness_of :user_id, scope: :follower_id
end
body {
font: 16px/1.4 "Helvetica Neue", Arial, sans-serif;
}
ul {
list-style: none;
border:1px solid #555;
padding:20px;
margin:0;
width:520px;
}
/**
*
Buttons
*/
button {
font : bold 35px Arial, sans-serif;
width : 230px;
padding : 15px 8px 15px 60px;
position : relative;
/**
*
Buttons
*/
button {
font : bold 35px Arial, sans-serif;
width : 230px;
padding : 15px 8px 15px 60px;
position : relative;
/**
*
Buttons
*/
button {
font : bold 35px Arial, sans-serif;
width : 230px;
padding : 15px 8px 15px 60px;
position : relative;
/**
*
Buttons
*/
button {
font : bold 35px Arial, sans-serif;
width : 230px;
padding : 15px 8px 15px 60px;
position : relative;
@cleitonfco
cleitonfco / dabblet.css
Created April 23, 2012 16:04
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
button {
border-radius:10px;
border:none;
width:200px;
padding: 10px 8px 10px 50px;
font-family:Arial, sans-serif;
@cleitonfco
cleitonfco / dabblet.css
Created April 23, 2012 15:26
Multicolumn (Count)
/**
* Multicolumn (Count)
*/
body {
background: #fff;
font:200 normal 14px/1.5 'Helvetica Neue', Arial, sans-serif;
}
h2 {
font-size: 20px;
@cleitonfco
cleitonfco / dabblet.css
Created April 14, 2012 14:07
Background Image Gradients
/**
* Background Image Gradients
*/
body {
background: #fff;
}
h2, h3, h4 {
display:block;
margin:20px;
width: 300px;