Hallo Werner, wer
<%= text_field 'passw', 'passw' %> sagt, muss auch params[:passw][:passw] sagen... Bye, Dennis -- Dennis Blöte Zentaurenstr. 14 28199 Bremen email : [EMAIL PROTECTED] web : http://dennisbloete.de fon : 0421-5487517 mobil : 0163-6845699 skype : Hammerhut Werner Laude schrieb: > Könnt ihr bitte mal drüberschaun.. habe da eine einfaches Login, aber er > läßt mich nicht rein.. > Denke, das da irgendwas mit der session nicht klappt, da wird einfach > nichts reingeschrieben. > Entweder wird create gar nicht ausgeführt, oder ich übergeben die > variabeln nicht korrekt. > . > > class AdminController < ApplicationController > before_filter :authorize, :except => :index > > -------------- > <% form_tag(:action => 'create')do %> > <label>Login: </label><%= text_field 'passw', 'passw' %> > --------------- > > def create > session[:passw] = params[:passw] > render :action => 'list' > end > > > protected > def authorize > unless admin? > flash[:notice] = 'Kein Zugang' > redirect_to :action => 'index' > false > end > end > > def admin? > session[:passw]== 'abc' > end > > > Danke für Hinweise.. > Werner > > > ------------------------------------------------------------------------ > > _______________________________________________ > rubyonrails-ug mailing list > [email protected] > http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug
begin:vcard fn;quoted-printable:Dennis Bl=C3=B6te n;quoted-printable:Bl=C3=B6te;Dennis adr:;;Zentaurenstr. 14;Bremen;Bremen;28199;Deutschland email;internet:[EMAIL PROTECTED] tel;work:+49 421 5 48 75 17 tel;home:+49 421 5 48 75 17 tel;cell:+49 163 6 84 56 99 x-mozilla-html:FALSE url:http://dennisbloete.de version:2.1 end:vcard
_______________________________________________ rubyonrails-ug mailing list [email protected] http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug
