search for: changed_attribut

Displaying 7 results from an estimated 7 matches for "changed_attribut".

Did you mean: changed_attributes
2013 Mar 21
0
how to remove changed_attributes from yaml response
Hi, I am using attr_accessor attributes in model class and assigning the values to attr_accessor dynamically in controller. And am sending the data object to display in Yaml format. I am getting the response along with changed_attributes but I don''t want changed_attributes details in my response. build Model code class Test < ActiveRecord::Base attr_accessor: t_1, t_2, t_3, t_4 end In Test Controller code: #build is controller object tb = ["[5, 30.14]","[0, 12.0]","[1, 11.0]","[2,...
2006 Sep 04
2
"include" versus "extend" - what's the difference
.... This assumes there is an audits table ready. # # class User < ActiveRecord::Base # acts_as_audited # end # # See <tt>CollectiveIdea::Acts::Audited::ClassMethods#acts_as_audited</tt> # for configuration options module Audited CALLBACKS = [:clear_changed_attributes, :audit_create, :audit_update, :audit_destroy] def self.included(base) # :nodoc: base.extend ClassMethods end module ClassMethods # == Configuration options # # * <tt>except</tt> - Excludes fields from being saved in the audit log. #...
2011 Oct 02
4
Aggregated attribute changed but _was is changed too. So nothing is update in database.
(Frenchy, sorry =) ) Hi everyone, i''ve got some troubles with aggregated attribute. I created a point and path class which receive postgresql point and path type data. Path object contains an array of point object. I''m currently working on a "hunting" module in web browser based game, and i need a crontab executed every n minutes to move the character on the map.
2006 May 17
0
acts_as_versioned with lock_version bug?
...=> #<Software:0xb7b3c290 @new_record_before_save=true, @errors=#<ActiveRecord::Errors:0xb7ae3ff0 @errors={}, @base=#<Software:0xb7b3c290 ...>>, @attributes={"name"=>"Initial name", "id"=>1, "version"=>1}, @new_record=false, @changed_attributes=[]> >> s.version => 1 >> s.save => true >> s.version => 2 >> ############ WHY? THERE SHOULD BE ONLY ONE VERSION! ############ ?> ?> >> s.reload => #<Software:0xb7b3c290 @new_record_before_save=false, @e...
2006 Apr 17
5
Finding out updated fields
Hi, When we update a record via an update form, is there an easy way to find out the fields that have been changed. If the update is successful, i want to display: The following fields have been changed: field-name = new-value ... Thanks, Lantis. -- Posted via http://www.ruby-forum.com/.
2010 Jun 08
9
[Rails Heroku] Problem with saving object (on heroku hosting)
Hi All, I have some strange problem which appears only on heroku hosting 2.3.5 default stack (not on my local computer) I have some models. Here they are: class Contact < ActiveRecord::Base belongs_to :user belongs_to :type, :class_name => "ContactType", :foreign_key => "type_id" validates_presence_of :name, :on => :create, :message =>
2010 Mar 23
0
Frozen hash problem
...in the hash: --- - &id001 !ruby/object:LabData attributes: created_at: 2010-03-21 22:16:06 unit_id: "3" lab_id: "81" updated_at: 2010-03-21 22:16:06 id: "184" lab_desc_id: "6" value: "29" attributes_cache: {} changed_attributes: {} errors: !ruby/object:ActiveRecord::Errors base: *id001 errors: {} And if I remove the "raise", the controller throws a "can''t modify frozen hash" error. Any idea how I can remove records from the hash prior to saving? TIA, Craig -- You received thi...