Skip to content

Commit

Permalink
Use by_star to find all posts before the "current" one for posts/edit…
Browse files Browse the repository at this point in the history
… viewing pleasure.
  • Loading branch information
radar committed Feb 3, 2010
1 parent c99c91d commit e100ddc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions app/controllers/posts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def create
end

def edit
@posts = @topic.posts.past(@post.created_at).last(10).reverse
end

def update
Expand Down
31 changes: 18 additions & 13 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@

CONFIG = Rails::Initializer.run do |config|

config.gem 'by_star', :version => '0.6.1'
config.gem 'chronic'
config.gem 'RedCloth'
config.gem 'highline'
config.gem 'coderay'
config.gem 'paperclip', :version => "2.3.1.1"
config.gem 'thinking-sphinx', :lib => "thinking_sphinx"
config.gem 'highline'
config.gem 'paperclip', :version => '2.3.1.1'
config.gem 'RedCloth'
config.gem 'thinking-sphinx', :lib => 'thinking_sphinx'


# lol actionwebservice
# lol activeresource
Expand All @@ -66,14 +68,17 @@
Find.prune
end

Sass::Plugin.options[:template_location] = themes
# Needs to be set for paperclip to find the identify command with Passenger.
Paperclip.options[:command_path] = "/usr/local/bin"

def puts str
super caller.first if caller.first.index("shoulda.rb") == -1
super str
end
Sass::Plugin.options[:template_location] = themes

def p obj
puts caller.first
super obj
end
# def puts str
# super caller.first if caller.first.index("shoulda.rb") == -1
# super str
# end
#
# def p obj
# puts caller.first
# super obj
# end

0 comments on commit e100ddc

Please sign in to comment.