<form name="f" action="/account/login" method="post" onsubmit="wait();"> ... </form>Now what you want is more like this:
<% form_tag :action=> "new" do %> ... <% end %>
u = find_first(["login = ? AND password = ?", login, sha1(pass)])You need something more like this nowadays:
u = find :first, :conditions=>["login = ? AND password = ?", login, sha1(pass)]It appears that all the find_* functions (find_first,find_all,etc) have all been rolled into the one-function-to-rule-them-all 'find' function. I guess it is neater.
@session @requestWith this:
session requestOne big 'find-in-files' (Ctrl-Shift-F in Notepad++) will sort you out with this one.
redirect_to_url '/blah/foo' ...becomes... redirect_to '/yada/yada'
@user_pages, @users = paginate :users, :per_page => 30, :order=>'login'Became:
@users = User.find :all, :order=>'login'Its pretty simple, and you'll need to remove all references to pagination in your views. If you really *really* need pagination, you'll need something more complex, but there isn't anything out-of-the-box for you. For more details: http://wiki.rubyonrails.org/rails/pages/HowtoPagination
Thanks for reading! And if you want to get in touch, I'd love to hear from you: chris.hulbert at gmail.
(Comp Sci, Hons - UTS)
iOS Developer in Sydney.
I have worked at places such as Google, Cochlear, News Corp, Fox Sports, NineMSN, FetchTV, Woolworths, and Westpac, among others. If you're looking for a good iOS developer, drop me a line!