Skip to content
Browse files

adding Sazima's fix for the featured bug

  • Loading branch information...
1 parent 7777560 commit 4199b3764ac0ca6da8a19c3916a51d04c640bdbb @stevenbristol stevenbristol committed Jul 21, 2008
View
2 app/controllers/application.rb
@@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
filter_parameter_logging "password"
- before_filter :allow_to, :check_user, :set_profile, :login_from_cookie, :login_required, :check_permissions, :pagination_defaults, :check_featured
+ before_filter :allow_to, :check_user, :set_profile, :login_from_cookie, :login_required, :check_permissions, :pagination_defaults
after_filter :store_location
layout 'application'
View
1 app/controllers/home_controller.rb
@@ -12,6 +12,7 @@ def contact
def index
+ check_featured
respond_to do |wants|
wants.html {render}
wants.rss {render :partial => 'profiles/newest_member', :collection => new_members}
View
3 app/models/profile.rb
@@ -115,7 +115,8 @@ def self.featured
:include => :user,
:conditions => ["is_active = ? and about_me IS NOT NULL and user_id is not null", true],
}
- find(:first, find_options.merge(:offset => rand( count(find_options) - 1)))
+# find(:first, find_options.merge(:offset => rand( count(find_options) - 1)))
+ find(:first, find_options.merge(:offset => rand(count(find_options)).floor))
end
def no_data?
View
2 vendor/plugins/footnotes/lib/footnotes.rb
@@ -104,7 +104,7 @@ def insert_styles
insert_text :before, /<\/head>/i, <<-HTML
<!-- Footnotes Style -->
<style type="text/css">
- #footnotes_debug {margin: 2em 0 1em 0; text-align: center; color: #444; line-height: 16px;}
+ #footnotes_debug {margin: 2em 0 1em 0; text-align: center; color: #444; background: #bbb; line-height: 16px;}
#footnotes_debug a {text-decoration: none; color: #444; line-height: 18px;}
#footnotes_debug pre {overflow: scroll; margin: 0;}
#footnotes_debug table {text-align: center;}

0 comments on commit 4199b37

Please sign in to comment.
Something went wrong with that request. Please try again.