Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix improper use of PortfolioEntry.any? - what that was going to be w…

…as PortfolioEntry.exists? but instead PortfolioEntry.count > 1 makes the most sense for reordering.
  • Loading branch information...
commit 52cdeb48a8504b02526fcb87026b49d75cf29054 1 parent f65c414
@parndt parndt authored
View
4 app/views/admin/portfolio_entries/index.html.erb
@@ -4,7 +4,7 @@
<li>
<%= link_to "Create New Portfolio Entry", new_admin_portfolio_entry_url, :class => "add_icon" %>
</li>
- <% if PortfolioEntry.any? %>
+ <% if PortfolioEntry.count > 1 %>
<li>
<%= link_to "Reorder Portfolio", "", :id => "reorder_action", :class => "reorder_icon" %>
<%= link_to "Done Reordering Portfolio", "", :id => "reorder_action_done", :style => "display: none;", :class => "reorder_icon" %>
@@ -27,4 +27,4 @@
</p>
<% end %>
</div>
-<%= render :partial => "/shared/admin/make_sortable", :locals => {:tree => true } if PortfolioEntry.any? %>
+<%= render :partial => "/shared/admin/make_sortable", :locals => {:tree => true } if PortfolioEntry.count > 1 %>
View
2  rails/init.rb
@@ -3,7 +3,7 @@
plugin.title = "Portfolio"
plugin.description = "Manage a portfolio"
plugin.url = "/admin/#{plugin.title.downcase}"
- plugin.version = '0.9.3'
+ plugin.version = '0.9.3.5'
plugin.menu_match = /admin\/portfolio(_entries)?/
plugin.activity = {
:class => PortfolioEntry,
View
4 readme.md
@@ -23,13 +23,13 @@ Then run:
refinerycms-portfolio-install /path/to/your/refinery/application
Then place in your config/environment.rb (or config/application.rb for refinery 0.9.6.x) file before all other Refinery gem calls:
- config.gem "refinerycms-portfolio", :version => ">= 0.9.3", :lib => "portfolio", :source => "http://gemcutter.org"
+ config.gem "refinerycms-portfolio", :version => ">= 0.9.3.5", :lib => "portfolio", :source => "http://gemcutter.org"
..and follow the instructions!
### Method Two
Place in your config/environment.rb (or config/application.rb for refinery 0.9.6.x) file before all other Refinery gem calls:
- config.gem "refinerycms-portfolio", :version => ">= 0.9.3", :lib => "portfolio", :source => "http://gemcutter.org"
+ config.gem "refinerycms-portfolio", :version => ">= 0.9.3.5", :lib => "portfolio", :source => "http://gemcutter.org"
Then run in your application's directory:
rake gems:install
View
2  refinerycms-portfolio.gemspec
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-portfolio}
- s.version = "0.9.3"
+ s.version = "0.9.3.5"
s.authors = ["Resolve Digital", "Philip Arndt"]
s.date = %q{2010-02-18}
Please sign in to comment.
Something went wrong with that request. Please try again.