Category: Ruby on Rails

  • Displaying Production-Only Markup in Rails

    If you are running something like Google Analytics on your website, you probably don’t want its associated JavaScript code to appear in your web browser while you’re developing (it would skew your statistics). In Rails, it is incredibly simple to block off a segment of markup for specific environments by using the Rails.env variable.

  • How to Use Rails Generators with MongoDB

    The MongoDB classes do not come with default generators for Rails applications. In order to use the rails generate commands, you can use the indirect rails3-generators project available at https://github.com/indirect/rails3-generators/#readme

All categories