beef-slides 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/app/models/slide.rb
CHANGED
@@ -20,14 +20,6 @@ class Slide < ActiveRecord::Base
|
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
23
|
-
def reindex
|
24
|
-
if self.created_at == self.updated_at #i.e. a new record
|
25
|
-
Slide.all(:order => 'position ASC, created_at DESC', :conditions => ['id != ', self.id]).each_with_index do |slide, index|
|
26
|
-
slide.update_attribute(:position, index)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
23
|
def has_file?
|
32
24
|
filename != 'no_file'
|
33
25
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<h1>Listing slide shows</h1>
|
2
2
|
|
3
3
|
<ul class="choices">
|
4
|
-
<li><%= link_to 'New
|
4
|
+
<li><%= link_to 'New slide show', new_admin_slide_show_path %></li>
|
5
5
|
</ul>
|
6
6
|
|
7
7
|
<table>
|
@@ -15,8 +15,8 @@
|
|
15
15
|
<tbody>
|
16
16
|
<% @slide_shows.each do |slide_show| %>
|
17
17
|
<tr id="slide_show-<%= slide_show.id %>">
|
18
|
-
<td><%= link_to slide_show.title,
|
19
|
-
<td><%= link_to pluralize(slide_show.slides.count, "Slide"), admin_slide_show_slides_path(slide_show)
|
18
|
+
<td><%= link_to slide_show.title, admin_slide_show_slides_path(slide_show) %></td>
|
19
|
+
<td><%= link_to pluralize(slide_show.slides.count, "Slide"), admin_slide_show_slides_path(slide_show) %></td>
|
20
20
|
<td><%= link_to 'Edit', admin_slide_show_path(slide_show), :class => 'edit' %></td>
|
21
21
|
<td><%= link_to 'Destroy', admin_slide_show_path(slide_show), :confirm => 'Are you sure?', :method => :delete, :class => 'delete' %></td>
|
22
22
|
</tr>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<tbody>
|
23
23
|
<% @slides.each do |slide| %>
|
24
24
|
<tr>
|
25
|
-
<th><%=
|
25
|
+
<th><%= slide.position %></th>
|
26
26
|
<td><%= image_tag slide.public_filename, :width => 100 unless slide.filename == 'no_file' %></td>
|
27
27
|
<td><%=h slide.title %></td>
|
28
28
|
<td><%= content_status(slide) %></td>
|
data/slides.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{slides}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Daniel Craig"]
|
9
|
-
s.date = %q{2009-09-
|
9
|
+
s.date = %q{2009-09-03}
|
10
10
|
s.email = %q{daniel@wearebeef.co.uk}
|
11
11
|
s.extra_rdoc_files = [
|
12
12
|
"LICENSE",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beef-slides
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Craig
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-03 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|