[Rails] Re: Re: authlogic and controllers - plus general advice

2010-08-05 Thread bingo bob
like this then? I'm checking for existence of id to deal with the index action, i think this might be OTT though? --- def find_baby_name @baby_name = BabyName.find(params[:id]) if params[:id] if @baby_name if @baby_name.user == current_user true else flash[:notice] =

Re: [Rails] Re: Re: authlogic and controllers - plus general advice

2010-08-05 Thread Colin Law
On 5 August 2010 14:47, bingo bob li...@ruby-forum.com wrote: like this then? I'm checking for existence of id to deal with the index action, i think this might be OTT though? --- def find_baby_name �...@baby_name = BabyName.find(params[:id]) if params[:id]  if @baby_name    if

[Rails] Re: Re: Authlogic Rails 3

2010-03-24 Thread Ken Foust
Conrad Taylor wrote: On Fri, Feb 19, 2010 at 1:08 AM, RaW ra...@wrzochol.net wrote: I think $ script/generate has been replaced with $ r g in Rails3 Am I right? You'll need to do the following in Rails 3: rails g model user_session Then just edit the file and you should be good

Re: [Rails] Re: Re: Authlogic Rails 3

2010-03-24 Thread Conrad Taylor
Sent from my iPhone On Mar 24, 2010, at 10:06 AM, Ken Foust li...@ruby-forum.com wrote: Conrad Taylor wrote: On Fri, Feb 19, 2010 at 1:08 AM, RaW ra...@wrzochol.net wrote: I think $ script/generate has been replaced with $ r g in Rails3 Am I right? You'll need to do the following in

[Rails] Re: Re: authlogic

2010-01-29 Thread Tom Mac
Hi Thanks for your reply. My model code is class User ActiveRecord::Base acts_as_authentic belongs_to :company end class Company ActiveRecord::Base has_many :users accepts_nested_attributes_for :users end My companies controller is def new @company = Company.new