This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #app/controllers/application_controller.rb | |
| class ApplicationController < ActionController::Base | |
| def opensearch | |
| response.headers['Content-Type'] = 'application/opensearchdescription+xml; charset=utf-8' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### /etc/default/rails ### | |
| APP_USER=vagrant | |
| RVM_SETTING="1.9.3-p125@rails32" | |
| RAILSDIR=/home/vagrant/rails | |
| # Example: STAGES=("vagrant_staging", "vagrant_production") | |
| STAGES=("vagrant_staging") | |
| # Example APPS=("myapp1" "myapp2") | |
| APPS=("myapp") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How to override a function in rails from Yuhuda Katz. I'm new to ruby and this always confuses me. nice to have a good example from a guru. | |
| class Foo < ActiveRecord::Base | |
| include FooBar | |
| end | |
| module FooBar | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| end |
NewerOlder