Displaying 3 results from an estimated 3 matches for "update_attrbut".
Did you mean:
update_attribut
2005 Dec 19
2
update_attrbutes without saving?
Hello all,
Is there a method for updating all the attributes from a hash without
saving to the database? (the counterpart of update_attributes but
without saving).
What I want to do is:
person = Person.find(params[:id])
person.update_without_saving(params[:person]) #update the in-memory
object.
# Process person object
.......
person.save
I know that when you are creating a new object, you can
2006 Apr 27
2
NoMethodError - why?
Getting this error when hitting update.
NoMethodError in Article#update
You have a nil object when you didn''t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occured while evaluating nil.update_attributes
Source code.
def create
@article = Article.new(params[:article])
@article.user = @session[''user'']
if @article.save
2006 Mar 17
3
Updating Table without ID Column
...ll,
I''ve been having a slight problem updating attributes for a row that
matches something other than it''s ID...For ex:
My table that has 3 rows..ColumnID, ColumnTitle, and ColumnDescription.
I want to update a row in that table WHERE CoumnTitle = @myvar....But
whenever i run update_attrbutes[:mytable] it''s looking for an id for the
record when i need to to look for the title...is there a way to override
that?
Any help is much appreciated!
--
Posted via http://www.ruby-forum.com/.