search for: write_attributes

Displaying 20 results from an estimated 104 matches for "write_attributes".

Did you mean: write_attribute
2009 Sep 23
5
Overriding AR read/write_attribute - Overridden write_attribute Is Never Called
Could someone explain this? #config/initializers/ar_attributes.rb module ActiveRecord module AttributeMethods alias_method :ar_read_attribute, :read_attribute def read_attribute(attr_name) p "read_override" ar_read_attribute(attr_name) end alias_method :ar_write_attribute, :write_attribute def write_attribute(attr_name, value)
2009 Oct 21
1
zfs acls and MS office applications
...y; files within have the same permissions (sans the inheritance). moe-lh /moe2/office/student_workers 546# ls -vd . drwxrws---+ 2 toml cefac 5 Oct 20 18:36 ./ 0:group:cefac:list_directory/read_data/add_file/write_data /add_subdirectory/append_data/write_xattr/execute/write_attributes /write_acl/write_owner:file_inherit/dir_inherit/inherit_only:allow 1:group:cefac:list_directory/read_data/add_file/write_data /add_subdirectory/append_data/write_xattr/execute/write_attributes /write_acl/write_owner:allow 2:group:ceoffstu:list_directory/rea...
2006 Nov 04
0
write_attribute trouble
Can anyone clarify something for me? I''ve been having a hard time with write_attribute. If I do (for instance in a callback): write_attribute(:user, user) Is obj.user_id set automatically too? And viceversa, if I do: write_attribute(:user_id, user.id) Does that set obj.user for me? Doesn''t seem like it''s doing that for me. Anyone understands exactly what
2005 Nov 23
14
ACL issues with ZFS
ZFS introduces a new and incompatible ACL interface into Solaris and this seems to be not yet fully completed in addition to the fact that is causes a lot of problems for software that needs to be compatible with Solaris-2.5 like star. Proof for incompatibility: create a file on UFS and set an ACL for this file. Use Sun tar cpf out file to archive this file. Unpack this archive file on ZFS
2007 Aug 02
1
write_attribute functionality for related objects?
Hi. Given: class Group < AR has_many :users end Is it in any way possible to retain reference to the old users when they get replaced using group.users=(new_users) ? The below doesn''t work but illustrates what I''m looking for: class Group < AR has_many :users def users=(new_users) @old_users = users write_attribute(''users'', new_users)
2006 May 10
0
Saving extracted data
Hi there, I have a file upload form on my page that is for images. In the model I have this: def file_data=(file_data) @file_data = file_data write_attribute ''extension'', file_data.original_filename.split(''.'').last.downcase write_attribute("content_type", file_data.content_type) write_attribute("current_name",
2006 Jul 14
7
Form validation - keepin correct fields displayed on refresh
All, I''m finally doing my first real form in Rails - the model object that I''m entering information for has 8 validations so far. If I type in good values for all the fields but one, I get the pretty validation, and the nice field highlighting, but all of the fields are cleared, forcing me to retype all of that info. That is a big drag. Is there a standard way to get the
2005 Dec 14
9
Passing quantity in a shopping cart
I am using this line on my index.rhtml page to capture the quantity required of a particular item for a basic shopping cart app: <%= text_field ''line_item'', ''quantity'', {:size=>3} %> </td> but my next screen (a cart screen) doesn''t reflect what was entered in that text field when the item is added to the cart. That is,
2010 Jan 31
0
? NFSv4 and ZFS: removing write_owner attribute does not stop a user changing file group ownership
...one. bash-3.00$ id uid=100(timt) gid=10001(ccbcadmins) bash-3.00$ groups ccbcadmins staff bash-3.00$ ls -v testacl -rwxrwx---+ 1 timt ccbcadmins 0 Jan 31 16:24 testacl 0:owner@:read_data/write_data/append_data/read_xattr/write_xattr/execute /delete_child/read_attributes/write_attributes/delete/read_acl /write_acl/write_owner/synchronize:allow 1:group@:read_data/write_data/append_data/read_xattr/write_xattr/execute /delete_child/read_attributes/write_attributes/delete/read_acl /write_acl/write_owner/synchronize:allow I can change the group owne...
2010 Jul 19
3
ActiveRecord override
Would really appreciate it if someone could tell me why this is happening: I override ssn method of AR class so I can encrypt/decrypt to/from the db: class Person < ActiveRecord::Base def ssn=(value) write_attribute(:borrower_ssn, Crypto.encrypt(self.encryption_key, value)) write_attribute(:borrower_ssn_final_four, value[5,4]) end def ssn # this begin - rescue can be
2006 Apr 24
0
ImageMagick and EXIF Data
Hi there, I''m writing a little application that parses an image file and extracts the camera settings from the file (the EXIF data) and saves all the fields to the database. The idea is that after awhile people will be able to search based on camera make, model, lens settings, etc... and all the pictures that meet those requirements will be displayed. The picture is stored on the file
2008 Feb 28
0
Windows permissions and inheritance
...it looks ok too, the permissions appear as: d---r-x---+ 3 ross smith domain users 3 Feb 28 08:24 Departments 0:group:domain admins:list_directory/read_data/add_file/write_data /add_subdirectory/append_data/read_xattr/write_xattr/execute /delete_child/read_attributes/write_attributes/delete/read_acl /write_acl/write_owner/synchronize:file_inherit/dir_inherit:allow 1:group@:list_directory/read_data/read_xattr/execute/read_attributes /read_acl/synchronize:file_inherit/dir_inherit:allow However, if I logon to a windows machine as a Domain Admin, and try to create the...
2006 Feb 06
7
Delaying initialization of associations until first access
Guys, Say I have the following: ----- class Person < ActiveRecord::Base has_one :house end class House < ActiveRecord::Base belongs_to :person attr_accessor :color end ----- Then I have the following code: ----- john = Person.new john.house.color = "Blue" john.save ----- What I would like to have happen, is that on first call to john.house, if house hadn''t been
2016 Nov 30
1
slow directory access, convert_string_internal: Conversion error: Incomplete multibyte sequence
...9 18:58 /Pool1/Department/Sales 0:user:nobody:read_xattr/read_attributes/read_acl:allow 1:user:root:read_xattr/read_attributes/read_acl:allow 2:group@:list_directory/read_data/add_file/write_data/add_subdirectory /append_data/read_xattr/write_xattr/execute/delete_child /read_attributes/write_attributes/delete/read_acl/write_acl /write_owner/synchronize:allow 3:owner@:list_directory/read_data/add_file/write_data/add_subdirectory /append_data/read_xattr/write_xattr/execute/delete_child /read_attributes/write_attributes/delete/read_acl/write_acl /write_owner/synchronize:allow #...
2006 Apr 20
5
Integrating with Legacy Databases
This seems like it must have been asked before - I really _did_ try to find it in the archives, so my apologies if it''s already out there. Utilizing ActiveRecord, I would like to specify a prefix for the column names in my table. For example, in ''Recipe 16 Integrating with Legacy Databases'' (Rails Recipes, from PragProg, by Fowler) they deal with integration with a
2009 Aug 17
1
Problem with setter override on ActiveRecord
(This message was originally written on StackOverflow -- the formatting is much prettier there -- http://stackoverflow.com/questions/1283046/problem-with-setter-override-on-activerecord) This is not exactly a question, it''s rather a report on how I solved an issue with write_attribute when the attribute is an object, on Rails'' Active Record. I hope this can be useful to others
2006 Jul 12
2
Weird problem. How to tell if an attribute has changed? Please help.
How do you tell if an foreign key attribute has been changed? For example, lets say you have a model with attribute table_a_id. Would you do this? def table_a_id=(value) if value != table_a_id @table_a_changed = true write_attribute ''table_a_id'', value end end def table_a=(value) if value != table_a @table_a_changed = true
2007 Dec 13
2
automatically strip values of activerecord attributes
i am doing a couple of times the following in my models class User < ActiveRecord::Base def name=(val) write_attribute :name, val.to_s.strip end end quite clear, it strips the name when setting it. now the question: Is it possible to do something like the following .. and if yes how could i achieve it class User < ActiveRecord::Base auto_strip :name, :street end thanks... --
2016 Nov 30
2
slow directory access, convert_string_internal: Conversion error: Incomplete multibyte sequence
There are definitely some files with some weird names- in an ssh session they don't even have regular characters. e.g -rw-rw---- 1 xxx xxx 114985112 Oct 31 14:39 ▒^t Not sure if that is related to problems though. The top command shows Memory: 12G phys mem, 343M free mem, 2048M total swap, 2048M free swap This is in the evening so should not be much load but I think
2007 Nov 26
6
Model setters, override attribute=(attribute)?
Hi, I have a model similar Basket shown below. If customer_type is set then it should also set customer to nil. Likewise, if I set customer, it should inspect the customer_type attached to the customer and set accordingly within Basket. However implementing it as below doesn''t seem to work. Am I missing a better way to achieve this? I had also considered using a before_save