Displaying 20 results from an estimated 3000 matches similar to: "update_attribute weirdness in edge"
2006 Apr 25
6
Searching over multiple MySQL tables
I am racking my brain over this, probably because I only know very
simple mysql functions.
Basically I''ve got a few tables, ex:
Albums (id,name,band_id); Bands (id,name,label_id), and Label (id,name)
I want to search through both album.name, band.name, and label.name
throwing all results into a variable, with no redundant info.
I think what I need to be doing is setting up some
2006 Mar 29
1
Problems with Ferret 0.9.0
Hi,
I upgraded from 0.3.2 to 0.9.0, and now my old search code doesn''t work
anymore. I get a lot of ArgumentErrors, for example:
"query.add_clause(Search::BooleanClause.new(query_parser.parse(term),
Search::BooleanClause::Occur::MUST))"
raises:
ArgumentError (wrong number of arguments (2 for 0))
"index_searcher.search_each(query)"
raises:
ArgumentError
2011 May 21
1
Consequences of overriding update_attribute to force validation?
I know the debate of whether this should validate has been rehashed
many times. My question is, what are the consequences of overriding
this method to force validation? Will this break fundamental things?
Will it break plugins? Is there a reason not to have a strict
validation option?
In my code I will never use this as I consider it a terribly broken
method, but some gems use it and in one case
2008 Jun 23
2
Messaging system
Hey All,
I''m trying to put a messaging system together using this
http://www.novawave.net/public/rails_messaging_tutorial.html.
All working fine but I''d like to be to thread the replies.
At the moment, a message goes out, someone replies to it and the
original is simply included in the reply. I''d like to be able to thread
the replies using acts_as_tree or something but
2006 Jan 04
0
update_attribute works, update_attributes doesn''t, why?
Hello again...
so I narrowed my problem down. For some reason, while using
login_generator, any User object I pull from the DB can be updated one
attribute at a time using update_attribute, but when I try and do
update_attributes it fails every time. Is this a limitation with
login_generator that I don''t know about, or is there a way around this?
I also tried the .update method and
2008 Aug 25
2
to catch exception from update_attribute
Hi
begin
ActiveRecord::Base.transaction do
pb_status_history = ProblemStatusHistory.new
pb_status_history.problem_id = @problem.id
pb_status_history.problem_status_id =
@problem.problem_status_id
pb_status_history.save!
ret_val=@problem.update_attribute("problem_status_id",''ab'')
if ret_val==false
2006 Jan 17
2
update_attribute and validations
Just in case it saves someone else the several hours of insanity I just
went through, update_attributes will not save unless the model
validations are satisfied, but update_attribute (the singular form)
will save the attribute to the database even if the model validations
would fail!
This appears to be a feature, not a bug
(http://api.rubyonrails.com/classes/ActiveRecord/Base.html) although
2006 Feb 27
4
update_attribute with Validation?
Does anyone know of a way to update individual attributes with
validation? update_attribute disables the validation checks in the
record model, so I''m wondering if there''s a workaround for this.
In my application, I want to allow the user to update some or all the
attributes without having to enter :password and :password_confirmation,
both of which are subject to
2008 Apr 28
1
update_attribute overwrites existing attributes with NULL.
Hmm.
When using update_attribute from within a worker method, it seems that
Backgroundrb inserts null values into all attributes that are not
explicitly set. Is this possible/true?
2011 Oct 12
2
update_attribute - effecting multiple attributes
Anybody know why this:
User.find(current_user).update_attribute(:last_subject,
params[:subject_id])
results in this:
AREL (0.6ms) UPDATE "users" SET "last_subject" = 4,
"encrypted_password" =
''f470e6e76203973146c3b07e8b31c976b19cb23a9bf37485ad1911687cdc7a29'',
"updated_at" = ''2011-10-12 13:43:21.727558'' WHERE
2006 Apr 21
2
update_attribute... only ONE
Hi,
I was reading the messages at
<http://wrath.rubyonrails.org/pipermail/rails/2005-December/006969.html>
http://wrath.rubyonrails.org/pipermail/rails/2005-December/006969.html,
Subject: [Rails] update_attribute send updates every field, why?
Well, I am having the same problem, and I do have a binary column where I am
storing files. Also, I am calling a web service so I can send the
2009 Nov 27
2
update_attribute does not update
My server is running Rails 2.3.4...am I not doing this correctly or is
something borked?
>> c=Contact.last
=> #<Contact id: 24, name: "Larry", email: "larry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org", phone:
2147483647, account_id: 8, created_at: "2009-11-27 18:16:25",
updated_at: "2009-11-27 18:40:08", hide_name: false, hide_phone:
false,
2006 Nov 29
5
wxSugar control problem
I''m using wx_sugar 0.1.2 with wxruby2-preview 0.0.37 on OSX and am
coming up with an error when trying to create a SpinCtrl (and quite a
few others have exactly the same prob.):
#file date_picker.rb
class DatePicker < Wx::Dialog
def initialize
super(nil, :title => "Pick a date...")
@cal = Wx::CalendarCtrl.new(self)
add(@cal)
#works fine up to
2007 Jul 18
10
Rails - Mock going out of scope?
Hello list,
I think I have a rails related RSpec problem with a mock going out of
scope on a recursive call to a model.
The code is at: http://pastie.textmate.org/79821 if you want to see it
highlighted. I have pasted it below as well.
Basically, I have an acts_as_nested_set model called "Node", which
works fine. I have a function which finds the language name of the
node instance.
2007 Nov 28
6
Broken edge
Hi all,
Not sure if I''m the only one with this problem...
We''re on edge for both rails and rspec, and i just did an update...
Some apparently innocuous rails stuff was updated, and then half my
specs broke due to an error in rspec_on_rails:
ArgumentError in ''UserController without logged in user should show
the index page''
wrong number of arguments (2
2008 Apr 19
1
update and update_attribute woes
i can not get update to work via controller/server.
it works via console ???
this is what i get when i run it
Club Load (0.005893) SELECT * FROM clubs WHERE (clubs."id" = 3)
SQL (0.000570) BEGIN
SQL (0.000454) COMMIT
club.update_attributes(:state => "CA")
or
Club.update(3, :state => "CA")
what am i overlooking?
2012 Sep 25
0
update_attribute, update_column and update_columns should update readonly attributes
Hi.
I created a pull request some time ago and didn''t get any reaction yet.
https://github.com/rails/rails/pull/7688
Should I do something special or just have a patient and wait?
I''m ready to answer any questions about my commit.
Thanks in advance.
Best regards,
Vadim Pushtaev
--
You received this message because you are subscribed to the Google Groups "Ruby on
2009 May 22
1
[PATCH server] fix for BZ #477796: pool name uniqueness
We already had the validation rule in place, but the way the betternestedset API sets the parent_id the rules were being bypassed.
Signed-off-by: Scott Seago <sseago at redhat.com>
---
src/app/models/pool.rb | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/app/models/pool.rb b/src/app/models/pool.rb
index 2979fcb..0a63723 100644
--- a/src/app/models/pool.rb
2009 Nov 26
2
[error] avahi_entry_group_add_service_strlst("AdminNodeFQDN") failed: Invalid host name
Hi,
After doing a clean install of ovirt in a Fedora 11 VM, I am unable to
get anything working in the web interface. All I get is an error 500.
After reviewing the logs I see the following error in
/var/log/http/error.log
[Thu Nov 26 11:29:11 2009] [notice] Apache/2.2.13 (Unix) DAV/2
mod_auth_kerb/5.4 mod_nss/2.2.11 NSS/3.12.2.0 mod_python/3.3.1
Python/2.6 configured -- resuming normal
2006 Jun 27
1
user.save now workie, but user.update_attributes does
In my User model, I had this:
def update_last_login_time
self.last_login = Time.now
self.save
end
But last_login was not being set.
When I changed it to this it worked:
self.update_attribute( :last_login, Time.now )
Any ideas why?
~S