Browse files

try the photo and album slider fix

  • Loading branch information...
1 parent a723091 commit bcee039e28c8fe13f724e8947cb9ac2477c6b88a @safarista committed Dec 28, 2012
Showing with 18 additions and 10 deletions.
  1. +1 −1 app/views/albums/index.html.erb
  2. +17 −9 db/seeds.rb
View
2 app/views/albums/index.html.erb
@@ -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) %>
View
26 db/seeds.rb
@@ -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.