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