friendly ids!

This commit is contained in:
Ilion Beyst 2015-09-11 14:51:35 +02:00
parent dbaded000f
commit bb9d4bc371
4 changed files with 9 additions and 1 deletions

View file

@ -24,6 +24,9 @@ gem 'cancancan'
# Haml for templating!
gem "haml-rails", "~> 0.9"
# Friendly ids!
gem 'friendly_id', '~> 5.1.0'
# Pure for css
gem 'purecss-rails'
# Use datatables

View file

@ -103,6 +103,8 @@ GEM
multipart-post (>= 1.2, < 3)
font-awesome-sass (4.4.0)
sass (>= 3.2)
friendly_id (5.1.0)
activerecord (>= 4.0.0)
globalid (0.3.6)
activesupport (>= 4.1.0)
haml (4.0.7)
@ -295,6 +297,7 @@ DEPENDENCIES
factory_girl_rails
faker
font-awesome-sass
friendly_id (~> 5.1.0)
haml-rails (~> 0.9)
high_voltage (~> 2.4.0)
jbuilder (~> 2.0)

View file

@ -11,6 +11,8 @@
#
class User < ActiveRecord::Base
include FriendlyId
friendly_id :name, use: :finders
devise :timeoutable, :omniauthable, :omniauth_providers => [:zeuswpi]
has_many :incoming_transactions,
class_name: 'Transaction', foreign_key: 'creditor_id'

View file

@ -72,7 +72,7 @@
{
targets: 1,
render: function(data, type, full, meta) {
return data/100;
return (data/100).toFixed(2);
}
}
]