Displaying 5 results from an estimated 5 matches for "instance_var".
2006 Mar 09
0
markably in instance_var mungling
this bug is similar to something i see already discussed on why''s
blogpost comments, which was reported fixed, but that was before the gem
was made available (which is what im using since i cant seem to access
the C.WTLS SVN)
my guess is one of 3 things: fix didnt propagate to gem, my own failure
to make an educated guess on proper setup (1), or a genuine bug
essentially,
for
2006 Apr 22
7
Instance variables versus local variables
This novice coder roughly understands the difference between instance
and local variables thanks to David Black''s excellent book, but I''m
still unclear as to when and why a either is more desirable to use.
In general, I use instance variables in my controller and local in my
views, but I''m not sure as to why or if this is correct.
Thanks
Joe Kowalski
2006 Apr 18
4
how would you take the duplication out of this?
i have these two really similar methods in my addressbook controller.
def edit_company
@company = Company.find(params[:id])
if request.post? and @company.update_attributes(params[:company])
flash[:notice] = ''Company was successfully edited.''
redirect_to :action => ''show'', :id => @company
end
end
def edit_person
2006 Jan 19
1
partials and instance variables for file_column
Hi,
Sebastian Kanthak of the file_column-Plugin wrote once:
"is the photo object inside a local variable or an instance variable
(e.g. photo or @photo)? url_for_file_column only works with instance
variables, like all other active record form helpers. Could this be
the problem?"
So I''m using file_column in a partial, e.g.
<%= render (:partial => "product",
2008 Apr 29
10
Better way to remove value from list??
I''ve got a field in a database that contains a string of ids.
I want to be able to remove an item from that list and save the list
again. The only way I saw how to do this was to convert it to an array
and back to a string again.
The variable names are for an example.
This code works, but I don''t think that it''s efficient. It''s all in my
controller.