similar to: Introspection of validates_presence_of

Displaying 20 results from an estimated 600 matches similar to: "Introspection of validates_presence_of"

2006 Jul 27
9
Introspecting validates_presence_of
Hello people, I''d like to detect whether an attribute of a model has vaildates_presence_of applied to it so I can automatically apply a mandatory (*) to the field...it doesn''t look easy...any ideas? Cheers, -- Dan Webb http://www.danwebb.net
2005 Apr 08
2
attr_names in test67
Hello, I'm wondering if the following situation is valid (though I think it isn't since I still cannot authenticate with ldap pass/userdb on test67 running on FreeBSD-5.3). Is it normal that the passdb_ldap_conn->attr_names second element (for instance) "turns to" "homeDirectory" as the following step by step gdb run sample shows ? : -- Breakpoint 1,
2005 Apr 12
1
test67 ldap_connection
Hello, I've been trying to figure out what's wrong with authentication against an ldap pass/user db with test67 as test62 was working fine. [ The problem is the same as previously described in this list : - FreeBSD-5.3 - dovecot-1.0-test67 - openldap-2.1.27 --> "ldap(dovetest,127.0.0.1): No password in reply" --> "NO Temporary authentication failure." or --
2005 Mar 30
2
test65 killed by SIGSEV
Hi, I had successfully set up dovecot-1.0-test62 + ldap pass/user db, but now I'm encoutering a SIGSEV problem with a similar set up of a brand new dovecot-1.0-test65 installation. The auth process is killed by a SIGSEV as reported in the error log file : dovecot: Mar 30 17:06:59 Error: child 28291 (auth) killed with signal 11 To be precise, the problem occurs in the
2005 Dec 16
4
Validation with Aggregation
ActiveRecord supports composed_of for value objects which is fantastic but one thing that it doesn''t seem to support (or at least I am unable to find any documentation for) validation of the value objects. For example, given the following: class Message < ActiveRecord::Base composed_of :sender, :class_name => ''EmailAddress'' composed_of :recipient,
2008 Mar 18
0
Major issues with ActiveRecord callbacks in BackgroundRb r324
Hi there I''ve been running BackgroundRb in production for a few months now. Recently we added encryption onto some of our ActiveRecord fields by hooking in the before_save and after_save callbacks, like: class MyCallback def initialize(attr_names) @attr_names = attr_names end def before_save(model) @attr_names.each do |attr_name| next if
2006 Apr 12
0
Netmask validator
Sharing the wealth. I just finished working on a custom netmask validator and thought others might benefit. Of course, comments and suggestions are welcome. def validates_netmask(*attr_names) configuration = { :only_numbers => ''must only use numbers as octet values'', :range => ''has one or more octet values that are > 255'',
2006 Jun 13
6
Dead horse: validates_associated
Regarding validates_associated... Let''s say I have: article belongs_to author But for whatever reason, I want an article to also be written anonymously and therefore not require an author. Then I have: Article: belongs_to :author validates_associated :author But I DON''T have validates_presence_of. What I want to do is validate that an author is valid --if it is
2006 Jun 20
1
Possible to check if form field is required?
Hi list, is it possible to check if form field will be required when form is submitted (through validates_presence_of or some other validates_* method)? I could do this manually but it doesn''t seems to me very DRY. For example, I would like to be able to dynamically add asterisk with some helper method if city is required here: City*: <%= text_field
2006 Jan 26
21
pagination_links help
I want append custom query parameters to my pagination links, like ?page=1&foo=bar. I can''t quite figure out how to do this with the pagination_links helper, although I believe the API says you should be able to: pagination_links(paginator, options={}, html_options={}) options are: :params: any additional routing parameters for page URLs Has anyone tried this? thanks, jeff --
2005 Apr 04
0
ldap auth with test66
Hello, The installation of 1.0-test66 (still on FreeBSD 5.3-RELEASE-p1 with openldap-2.1.27) solved the SIGSEV problem I posted here on March 30 but I still cannot authenticate correctly with ldap. logs report "ldap(dovetest,127.0.0.1): No password in reply" and my client gets a "NO Temporary authentication failure." Obviously the attr_names array of the
2006 Dec 12
2
RXML partial question
All, I have a RXML template which renders partial RXML templates within it. A snippet is below. The "xml" variable is the parent template''s Builder variable. It is passed into the partial under the name "parent_xml". Why can''t I use :locals => {.... :xml => xml ....} in my call to render the partial? It seems like if I do use :xml => xml, it
2005 Apr 18
1
password_verify in test67 with ldap
Hello Timo, your patch introducing pass_attr_names and user_attr_names fixed the problem of the 'shared' attr_names member of [passdb|userdb]_ldap_conn as I answered in the relative thread. Now I think there is a problem while comparing user-provided and ldap-provided passwords causing a false 'password mismatch' situation, while using PLAIN mechanism with LDAP authentication.
2011 Sep 17
3
[PATCH 1/1] hivexml: Base64-encode non-printable data
Some of the data in names and string values were being unsafely printed, causing some types of XML processors to fail (e.g. Python's Expat). This patch checks for printability of each character and outputs base64 with an encoding attribute for unsafe data. --- xml/hivexml.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 64 insertions(+), 11 deletions(-)
2009 Dec 13
1
Different PROXY for IMAP and POP3 using LDAP-auth
-------------------------------------------------- For all non german speaking people: Oliver asked: In an old posting I've read something about different proxy hosts for IMAP and POP3. http://www.dovecot.org/list/dovecot/2008-July/031885.html I've got the same problem and want to ask you, if there is a patch for replacing [variable names in] pass_attrs.
2005 Dec 30
5
HABTM with finder_sql problem (Rails bug?)
I''m building an app that needs i18n support across the entire database (i.e. localized attributes). In order to do this I''ve created a special HABTM join table that can be associated with _any_ other table: create table language_strings ( for_table varchar(255) not null, foreign_id int not null, language_id varchar(5) not null, attr_name varchar(255) not null, value text
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)
2013 Mar 01
2
Debian repositories only for amd64
Hi, Is there any particular reason why the Debian repositories (at http://download.gluster.org/pub/gluster/glusterfs/LATEST/Debian/ ) only have packages for amd64? I don't mean to pressure for more convenience; I'm just wondering if there's any reason to avoid using it on i386.
2003 Nov 04
0
PATCH: make local IP address available to auth modules
The attached patch makes the local IP address to which the client connected available to the authentication modules; i.e., the local IP address is available for substitution as %i for the mysql and pgsql modules. We needed this feature to support thousands of our legacy accounts which are authenticated by username/local_part (not the full email address) and IP address (one per domain). Timo,
2006 Sep 04
2
"include" versus "extend" - what's the difference
Hi, Just wondering when one would use "include" over "extend"? Both seem to bring in methods to the class no? The context is I''m just trying to understand why both are used with the acts_as_audited plugin: Full extract from plugin (used within here): ================================================== # Copyright (c) 2006 Brandon Keepers # # Permission is hereby