Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Aditya Sanghi's Profile

GitHub User: asanghi

Site: http://me.adityasanghi.com

Comments by Aditya Sanghi

Avatar

Be careful not to cache pages which might be common to users with different timezones. Or use javascript to change the times on the client side.

@ryanb, can you please elaborate a bit more about the leaky before filter? It's convenient that time accepts a block so around filter fits in perfectly, but i was just curious about the leaky before filter comment.

Avatar

index_by works a lot better after a group by query compard to group_by.

Avatar

Wow Ryan! That was some fast turnaround! I only emailed you a couple of days back on this request.

Just adding a bit more.

I really wanted to keep my HTTP server block configuration DRY for nginx.

You can keep the HTTP and HTTPS server block in nginx configuration the same by simply adding a listen for port 80 and port 443 in the same block. Further you can add the ssl options in that same block as well. All you need to change is the X-Forwarded-Proto to be set to $scheme instead of http or https.

Avatar

Just in case someone is interested to know, in Ubuntu versions 11.10 (Oneiric Ocelot) and onwards the "admin" group is not going to be provided by default. The power that be are favouring the "sudo" group instead of "admin" group. If you're upgrading from a lower version, your "admin" group will persist but on a fresh install "admin" group will be missing.

So if you get an error that "admin" group does not exist, simply replace it with "sudo".

adduser deployer --ingroup sudo

Avatar

If I can get some attention or upvotes, you'll help stamp out ruby-debug19 from the Rails Gemfile template https://github.com/rails/rails/pull/5835

Avatar

@dominik it's not really abandoned, it's just not being looked after as it should be. It's a huge pain to install on Ruby 1.9.3 due to gems not released to rubygems.org! Personally I think it was about time it was forked considering 1.8.7's death is preeminent and 1.9.3 has been GA for over 6 months.

Avatar

Seems like this problem is specific to ruby1.8

try this in your irb session

YourActiveRecordModel
YAML.load YourActiveRecordModel.to_yaml
=> YourActiveRecordModel

If you dont get your AR model back, there is a problem. I'm getting Class returned on ruby 1.8.7 and the correct result on ruby 1.9.3-p0

Just FYI

YourActiveRecordModel.to_yaml
=> "--- !ruby/class:YouActiveRecordModel {}\n"
This will WORK (this is what i see returned in ruby 1.9.3)

YourActiveRecordModel.to_yaml
=> "--- !ruby/class YourActiveRecordModel\n"
This will NOT WORK (this is what is see returned in ruby 1.8.7)

Avatar

You must've been lucky with using delay as a Class method. I wonder what your stack is (ruby version/gem version/bundler version/rails version).

Gives a NoMethodError on Class when executing the job. The target class doesnt serialize/deserialize properly it seems. Seems like there are 3 open tickets relating to this on Github.

Avatar

if the messages contain javascript, would that get executed now that we're using html_safe in the nested_messages helper?

Avatar

Making controllers downright anorexic.