Displaying 4 results from an estimated 4 matches for "create_person".
2008 Jan 11
5
Missing methods
...efault_attributes = valid_#{klass}_attributes
#{klass.camelize}.create! default_attributes.merge(attributes)
end
EOF
end
def valid_message_attributes(options = {})
{
#some message options
}
end
#more valid_x_attributes methods
end
When I require this file in a spec file, Factory.create_person works
fine. When I try to do it in a step file, Factory.create_person is
defined, but it fails because valid_person_attributes is missing. If
I''m in a debugger, and I do require ''model_factory'' followed by
Factory.create_person, same deal.
Do we have a blank slat...
2007 Oct 16
10
Scenarios Plugin Pre-Announcement
This is sort of a pre-announcement for a Rails plugin my friend Adam
Williams and I are working on. We''re in the process of extracting it
from a project we are working on so that it can be generally useful to
the Rails community. We are calling it "Scenarios". It is a drop in
replacement for Rails fixtures:
http://faithfulcode.rubyforge.org/svn/plugins/trunk/scenarios/README
2006 Mar 21
7
Nuube Sequence problem
...ng, surname)
VALUES(''Mr'', ''100'', '''', 10, ''T'', null, null, ''T'', '''', :id, ''Chris
Richards'', 0, null, ''T'')"
My Code (standard generated code):
def create_person
@person = Person.new(params[:person])
if @person.save
flash[:notice] = ''Person was successfully created.''
.....
else
......
end
end
Its wierd, ive used rails for weeks with no problems.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
2006 May 16
9
Date transform
hi all,
i want my users to enter a date in "ddmmyyyy" format, do someone know
how may i transform it in "yyyy-mm-dd" in the controler before i add it
to the base please?
thks
irong
--
Posted via http://www.ruby-forum.com/.