search for: find_by_nick

Displaying 2 results from an estimated 2 matches for "find_by_nick".

2007 Dec 09
2
Questions about rails 2.0
...authenticate_or_request_with_http_basic do |user_name, password| user_name USER_NAME && password PASSWORD end and in the method you check if are equals. with a user model everything will be something like this? authenticate_or_request_with_http_basic do |user_name, password| user = User.find_by_nick(user_name) user && password == user.password end (ok, in this case the password is not encrypted, but itÂ’s just an example :) ) Last question, what changes with the normal authentication? is it better using this by http? why? thanks :) # kgodel on 08 Dec 23:10: David, You mention t...
2006 May 29
0
using components to reuse code
the following is the code of the controller, under the dir components/test/: class Test::GroupsManController < ApplicationController uses_component_template_root def add_to_group @account = Account.find_by_nick(@params[:nick]) # render :text => "#{session[:account_id]} #{Group.find(session[:group_id]).owner_id}" if (session[:account_id] == Group.find(session[:group_id]).owner_id) Account.join_group(@account.id, session[:group_id]) # render_component (:controller => ''test/...