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] =
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
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
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
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
5 matches
Mail list logo