Skip to content

Commit

Permalink
try the photo and album slider fix
Browse files Browse the repository at this point in the history
  • Loading branch information
safarista committed Dec 28, 2012
1 parent a723091 commit bcee039
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/views/albums/index.html.erb
Expand Up @@ -3,7 +3,7 @@

<ul class="thumbnails">
<% @albums.each do |album| %>
<% p = album.photos.try(:last) %>
<% p = album.photos[0] %>
<li class="span3">
<div class="thumbnail" >
<%= link_to image_tag(p.name ? p.name.url(:thumb): 'http://placehold.it/260x180', alt: p.caption, width: '100%'), album_photos_path(album) %>
Expand Down
26 changes: 17 additions & 9 deletions db/seeds.rb
Expand Up @@ -8,12 +8,20 @@

# Create the first database user with permisions to be the boss.

User.create(
full_name: 'Nelson Kelem',
username: 'jackBouer',
email: 'nelson@safarista.com',
password: 'password',
password_confirmation: 'password',
admin: true,
about: 'I am a web and mobile applications developer based in Lincoln UK. I hail from the foothills of Narok in Kenya. Dont say anything bad about morans and Maasai, I shall take you to the bush for it. :] '
)
# User.create(
# full_name: 'Nelson Kelem',
# username: 'jackBouer',
# email: 'nelson@safarista.com',
# password: 'password',
# password_confirmation: 'password',
# admin: true,
# about: 'I am a web and mobile applications developer based in Lincoln UK. I hail from the foothills of Narok in Kenya. Dont say anything bad about morans and Maasai, I shall take you to the bush for it. :] '
# )

# Recreating all the versions of the images to reduce problems of this shit sitiing here
# This is a carrierwave problem
Album.all.each do |album|
album.photos.each do |photo|
photo.name.recreate_versions!
end
end

0 comments on commit bcee039

Please sign in to comment.