note avatar
This commit is contained in:
parent
6947f1aaea
commit
dc49719bd2
@ -98,6 +98,7 @@ GEM
|
|||||||
net-ssh (>= 1.99.1)
|
net-ssh (>= 1.99.1)
|
||||||
nokogiri (1.5.6)
|
nokogiri (1.5.6)
|
||||||
orm_adapter (0.4.0)
|
orm_adapter (0.4.0)
|
||||||
|
pg (0.14.1)
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
posix-spawn (0.3.6)
|
posix-spawn (0.3.6)
|
||||||
pygments.rb (0.3.7)
|
pygments.rb (0.3.7)
|
||||||
@ -174,6 +175,7 @@ DEPENDENCIES
|
|||||||
kaminari
|
kaminari
|
||||||
mysql2
|
mysql2
|
||||||
nokogiri
|
nokogiri
|
||||||
|
pg
|
||||||
pygments.rb
|
pygments.rb
|
||||||
rails (= 3.2.9)
|
rails (= 3.2.9)
|
||||||
redcarpet
|
redcarpet
|
||||||
|
@ -9,8 +9,8 @@ class Admin < ActiveRecord::Base
|
|||||||
attr_accessor :login
|
attr_accessor :login
|
||||||
|
|
||||||
# Setup accessible (or protected) attributes for your model
|
# Setup accessible (or protected) attributes for your model
|
||||||
attr_accessible :email, :password, :password_confirmation, :remember_me, :username, :name, :firstname
|
attr_accessible :email, :password, :password_confirmation, :remember_me, :username, :name, :firstname, :file
|
||||||
# attr_accessible :title, :body
|
# attr_accessible :title, :body
|
||||||
|
|
||||||
|
mount_uploader :file, AvatarUploader
|
||||||
end
|
end
|
||||||
|
@ -29,7 +29,12 @@
|
|||||||
%tr
|
%tr
|
||||||
%td.label= f.label :password_confirmation, "Confirmation :"
|
%td.label= f.label :password_confirmation, "Confirmation :"
|
||||||
%td= f.text_field :password_confirmation, :class => "inputText"
|
%td= f.text_field :password_confirmation, :class => "inputText"
|
||||||
|
|
||||||
|
%tr
|
||||||
|
%td.label= f.label :file,"image :"
|
||||||
|
%td
|
||||||
|
= f.file_field :file
|
||||||
|
=image_tag(f.object.file.large.thumb.url) if f.object.file
|
||||||
|
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
.left
|
.left
|
||||||
|
|
||||||
.user
|
.user
|
||||||
|
=image_tag (note.admin.file? ? note.admin.file.large.thumb.url : ""), :class => "avatar"
|
||||||
=gravatar_image_tag(note.admin.email, :class => "avatar", :gravatar => {:default => "http://#{HOSTNAME}/assets/default_avatar.jpg"})
|
|
||||||
|
|
||||||
=note.admin.username
|
=note.admin.username
|
||||||
.date=l note.created_at, :format => :short
|
.date=l note.created_at, :format => :short
|
||||||
|
@ -10,7 +10,6 @@ development:
|
|||||||
database: pic_vert
|
database: pic_vert
|
||||||
pool: 5
|
pool: 5
|
||||||
username: root
|
username: root
|
||||||
password: dev
|
|
||||||
socket: /tmp/mysql.sock
|
socket: /tmp/mysql.sock
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user