Permalink
Browse files

Seed inquiries so that it shows up on the current users plugins.

  • Loading branch information...
1 parent 428ceca commit a31dd4ae3a37f9f48d0b3160eea72d027009eec0 @djones djones committed May 27, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 db/seeds/pages_for_inquiries.rb
@@ -1,3 +1,10 @@
+::User.find(:all).each do |user|
+ if user.plugins.where(:name => 'refinery_inquiries').blank?
+ user.plugins.create(:name => "refinery_inquiries",
+ :position => (user.plugins.maximum(:position) || -1) +1)
+ end
+end if defined?(::User)
+
if defined?(::Page)
page_position = (::Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)

0 comments on commit a31dd4a

Please sign in to comment.