RailsCasts Pro episodes are now free!

Learn more or hide this

Linus Oleander's Profile

GitHub User: oleander

Site: http://radiofy.se

Comments by Linus Oleander

Avatar

Why not just sign all params on the client and server side using SHA1?

Client: api_key = SHA1(params, secret_salt, date)
Server: SHA1(params, secret_salt, date) == api_key

Avatar

tailf doesn't exist in OS X, using tail -f -n 40 log/development.log works tho.

Avatar

A good idea, if you have the money, is to use Websolr.

Avatar

Yes. One solution is to add a comment observer that updates the article model when needed.

ruby
class CommentObserver < ActiveRecord::Observer  
  def after_save(comment)
    if comment.content_changed?
      Sunspot.index!(comment.article)
    end
  end
end
Avatar

Remove the dot in the end of the url.

[Ryan Bates: fixed it]