similar to: Hiding Model Attribute

Displaying 20 results from an estimated 1200 matches similar to: "Hiding Model Attribute"

2005 Apr 23
7
Validation question
Hi all, Is there a way to invoke validations at times other than save, create and update? I know that I can do this by writing my own validation checks using errors.add_[blah], but I''d like to leverage the existing validation code. What I have is two sets of fields in a record, set A and set B. Both sets must be validated on record create. However, the trouble is that after
2006 Aug 01
2
HOWTO? security based on data values
Hi! I recently started with RoR and this may be a newbie question. I have a company table, employee table and transactions table. 1 company has many employees. Each employee performs many transactions. Employees from different companies LOGIN to the system to record their transactions. Employees can search on all transactions associated to their companies (indirect relationship via employee),
2006 Aug 04
1
SOAP::Mapping::Object attribute access
I have written a Rails web service, which is working exactly as expected. The service has a method which returns an object of type ActionWebService::Struct. In my SOAP client, I create a SOAP rpc driver, and execute the method, like this: book = driver.ShowTitle(params[:isbn]) I then do a: logger.info book.inspect and find this in the log: <SOAP::Mapping::Object:0x..ca7b389da
2006 Jan 19
2
Easy way to handle form input without a model class?
I have a couple forms that I''d like to be able to validate and automatically populate, but it shouldn''t be based on AR. In fact I often have a bunch of small forms that I can''t really justify writing a whole new model class for anyway. I''d like to validate the form input, and then use rails helpers to automatically populate the form if validations fail.
2006 Jun 22
5
changing user/group on port 80
I''m trying to run mongrel on port 80 and switch to a different user/group from root. As root, this works: mongrel_rails start -p 3000 -u rails --group rails This: mongrel_rails start -p 80 -u rails --group rails dies with: --------------------------- ** Changing group to rails. ** Changing user to rails. ** Starting Mongrel listening at 0.0.0.0:80
2015 May 31
4
[LLVMdev] Hash Table Virtual Calls with Conflict Resolution Stubs
Hi everyone, I'm the developer of the Loci programming language ( http://loci-lang.org ), for which the compiler is a front-end for LLVM. I would like to say that LLVM has been extremely useful for the development of the compiler and so thank you everyone for building this amazing system. ---- Virtual Method Calls ---- While most aspects of the language map well onto LLVM IR, it seems
2011 Jan 20
3
utility to update indexes ?
We have both dovecot and a webmail application that are both modifying our users maildirs, so dovecot indexes can be out of sync when the webmail has been messing with the maildirs. We also have a webservice that report how many unread messages a user has in his inbox, which is simply counting files in the maildirs (plus caching the result, and present old values if the directory timestamps hasn?t
2006 Apr 14
7
SHA2 Issues
Hello all, Thank you in advance for your help with this. I am trying to implement the user authentication method from Ruby Recipes which calls for the use of SHA 2. Here is the code for the password: def password=(pass) salt = [Array.new(6){rand(256).chr}.join].pack("m").chomp self.password_salt, self.password_hash = salt, Digest::SHA256.hexdigest(pass + salt) end I open
2007 Nov 23
2
Create my own dynamic "finder" method?
Hi all I''m having an authorization method that looks like the following: def user_requests_authorization_to(right_name) ... end I find it boring to always use user_requests_authorization_to(''EDIT'') user_requests_authorization_to(''CREATE'') etc., so I thought I could implement my own dynamic method, like the dynamic finders! Instead of the calls
2006 Jun 09
18
Is IRB the ruby console ?
I''m running script/console but keep getting the message that irb.bat is not recognized as an internal or external command, operable program or batch file. If it means anything I am running instant rails. I can invoke irb straight forward. TIA Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Apr 24
4
delay() and bind()
Hy This works in my Class: this.hideNavi(); I tried: this.hideNavi().delay(5000); // -> Error: this.hideNavi() has no properties I tried: this.hideNavi().bind(this).delay(5000); // -> Error: this.hideNavi() has no properties How can I fix? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
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
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)
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
2006 May 31
6
habtm on an array (or object.habtm.habtm)
Hi, I have three Models: User, Group and File. User habtm groups and Group habtm Files How can I find all files that a particular user has access to? eg user.groups.files ? As user.groups returns an array, the above doesn''t work. Id like to find the files for all groups in that array, without adding any code to the User model. Thanks in advance PS I just posted this in the
2019 Mar 31
3
error in samba 4.10.0 while using samba-tool domain provision
Dear samab developer, Im getting the below error while using samba-tool domain provision and others like dbcheck and time, [root at emad-srv1 bin]# ./samba-tool domain provision --use-rfc2307 --interactive Realm: EMAD.HC Domain [EMAD]: Server Role (dc, member, standalone) [dc]: DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: BIND9_DLZ Administrator password:
2006 Jul 30
34
ruby suitable for financial apps?
hi there, I am about to embark on a mission critical financial web application, and was wondering weather ruby on rails is the best fit for this type of project. More specifically I am worried about floating point errors. Would it be more appropriate to use a more statically typed framework (.NET)? thankyou. -- Posted via http://www.ruby-forum.com/.
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
2017 Feb 14
3
(RFC) JumpMaps: switch statement optimization
I wonder if it would make sense to emit the jumpmap_find_ functions in IR rather than in compiler-rt. Many targets don't link against compiler-rt, e.g. x86 Linux typically uses libgcc. If they're emitted in IR, the functions could potentially be inlined. For example if the size of the switch is known to be small so no binary search is done, could inlining the find_ function be smaller
2012 Jul 22
4
Facter fact length?
This is a bit of a leading question, but is there a limitation as far as length/size of facts on a node? I have a need to perform one way sync of user accounts (non-Puppet managed users) on many pairs of servers. Thus far, it''s been done with scripts from primary -> backup server, and has been problematic. I''d like to create a fact that returns user:password_hash pairs,