This is a catalog of the various deprecation notices that I worked through during my upgrade to Rails 3.
###Details These constants have been phased out in favor of attributes on the Rails module
# Rails 2
if RAILS_ENV = 2.3
# OR
RAILS_ROOT| <?php | |
| $url = 'http://api.app.dev:3000/messages'; | |
| $data = array( | |
| 'data' => | |
| json_encode(array( | |
| 'test' => 'hello & more details', | |
| 'fail' => 'asdf;sadfsfa=' | |
| )) | |
| ); |
| function gitto() { | |
| git diff $1 --name-status | grep -c "^[AM].*migrate" | |
| COMPREPLY=($(git branch)) | |
| } |
| require 'devise/strategies/base' | |
| # in order to diagnose issues with the iphone app, we needed | |
| # to monkeypatch the error code to put the error explanation in the logs | |
| module Devise | |
| module Strategies | |
| class Oauth2GrantTypeStrategy < Authenticatable | |
| # return custom error response in accordance with the oauth spec | |
| # see http://tools.ietf.org/html/draft-ietf-oauth-v2-16#section-4.3 |
| require 'benchmark' | |
| str = "1234 Ocean Drive #PH 2" | |
| n = 50000 | |
| def split_arr(str) | |
| str.split('#')[0] | |
| end | |
| def slice_index(str) |
| <p class='sub'> | |
| Showing <%= size == 0 ? 0 : start + 1 %> to <%= (start + per_page) > size ? size : start + per_page %> of <b><%= size %></b> jobs | |
| </p> |
| #!/bin/bash | |
| git_prompt () | |
| { | |
| if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
| return 0 | |
| fi | |
| git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') |
| UPDATE c SET | |
| CreateDate = CASE WHEN UPDATE ([CreateDateUTC]) THEN dbo.ConvertUTCTimeToPacific(i.CreateDateUTC) | |
| ELSE CreateDate | |
| END, | |
| CreateDateUTC = CASE WHEN UPDATE ([CreateDate]) THEN dbo.ConvertPacificTimeToUTC(i.CreateDate) | |
| ELSE CreateDateUTC | |
| END | |
| FROM dbo.Calls AS c | |
| JOIN INSERTED AS i | |
| ON i.CallId = c.CallId; |
| describe 'Statement', -> | |
| createStatement = (callback)-> | |
| domtest (window)-> | |
| Statement = window.require 'models/statement' | |
| model = new Statement() | |
| callback(model) | |
| it 'can be initialized', (done)-> | |
| createStatement (model)-> |
| # command line | |
| gem install optify | |
| # with bundler | |
| gem 'optify' |