similar to: unique boolean flag

Displaying 20 results from an estimated 20000 matches similar to: "unique boolean flag"

2006 Dec 21
5
Advice with Model tests
Hi! I''m developing a rails applicaton with specify-before approach, with nice results so far. I use mocks and stubs in both Controller and views tests, but the main issue is with model testing. Since I''ve seen many examples here and there, I don''t know if the right way is to use fixtures or not at all (in model specs). Atm, I''m using them, but I
2007 Aug 27
2
Testing arbitrary SQL
Hi, I would like to know how would you test a method in a model that uses complex a SQL query that joins several tables in order to make a calculation. I suppose that I need fixtures, although my approach with rspec is to avoid fixtures and isolate model specs, but none of both seems possible in this case. Is there another way than fixtures? Thanks.
2005 Oct 19
4
ER strikes back
Hi Railers, A long, long, time ago, i made a Framework/CMS in php. There were two core models: Content and Content_type. Content_type was only a list of content types (as expected): new, article, etc. Content_type was not mandatory, but it allowed later to "deactivate" types of contents, for example. So then Content stored the common attributes/properties between the different content
2005 Dec 22
4
advice on MySQL version
I am going to start a project from scratch with MySQL. Is it a good idea to go ahead with MySQL 5? Is there any gotcha with that version as of today? -- fxn "We all agree on the necessity of compromise. We just can''t agree on when it''s necessary to compromise." -- Larry Wall in comp.lang.perl
2005 Dec 26
2
Fedora Core 2, cPanel and Ruby
Hi, i have a live server with Fedora Core 2 and cpanel. I want to install Ruby 1.8.2, so i can use rails, but it has some dependencies that need to swith the computer to Fedora 3. It requires a new version of openssl, which breaks dependencies in a LOT of packages. What do you recommend me to do? Update the whole system (how?), use some kind of chroot to install the new version of ruby...?
2005 Dec 16
2
Shared code for controllers
Hi, I think that this is made from a plugin or something in /lib/, but i really don''t know which is the better way: I have this in my MediasController: def mediatype_medias_options if params[:id] begin @mediatype = MediaType.find(params[:id]) render :inline => "<%= options_from_collection_for_select @ mediatype.medias, ''id'',
2006 Jul 06
0
radio_button with boolean fields does not work with postgresql
I don''t know what I am doing wrong. I have a User class with a "send_message_emails" boolean field. The value for this is true. In postgresql this is stored as a "t" in the database. In Rails this field is a boolean and is set to true, but for some reason the following code is *not* working... the radio_button is not selected. <%= radio_button "user",
2006 Oct 22
1
Rails association and multiple indexes
Hi! If I have two models, Product and Manufacturer, of course Product belongs_to :manufacturer. A search engine would allow a user to look for a product by its name or manufacturer. Is it better to define a method like: def searchable_field "#{name} #{manufacturer.name}" end and add it as indexable field (acts_as_ferret :fields =>
2006 Feb 23
2
create_for_*
Hi! If I have a /budget/create action, how should I make a /budget/create_for_customer without repeating myself? I could create a "create_for_customer" action and call "create" from there, but stripping the customer select_tag somehow, since customer_id will be passed from /customer/show. How do you do the create_for_something stuff? Thanks, Rodrigo. -- Posted via
2006 Jul 15
0
Validate using boolean values
The Problem: how to do the validation. I have not written it correctly!!! Given two tables: sizes and prices; with a relation: has_many ,belongs_to a Price.unit_price for a given Size.meassure must be marked ''true'' as the standard unit_price for that meassure. There will be many other unit_prices for a given meassure, those must be marked ''false'' table
2006 Mar 07
0
RE: nuevos requisitos
Ok, barbaro, entonces los nuevos requerimientos ser?an: 1) Que ariel pueda cambiar la configuraci?n de su pantalla. 2) Que ariel pueda acceder al servidor de desarrollo (10.0.9.119) a los puertos comunes de servicio (ftp, smtp, pop3, imapd, http, https, samba, svn, csv). Lo que necesito que acceda ahora es al samba, http y svn, lo dem?s planeo darle un futuro uso. 3) En
2009 Jan 12
2
validates_presence_of fails with false boolean
This almost feels like a bug to me, since false is not nil. (i don''t think!) Using v_p_o on a boolean field fails validation if the field is passed with ''false''. It passes validation in the case of true. How can I validate _presence_of a boolean if it is submitted false? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~
2006 Mar 10
6
boolean select problem
I want to use select form elements to choose between boolean options. How can I have it default to true and still display the persisted value (either true or false) when editing an existing object? I guess booleans default to false by default so its not obvious how to recognize when it''s a real ''false'' that the user set or default false because the value was null.
2006 Feb 28
6
How To Validate Boolean Form Field
Hello all. I''ve got the following in my model: class Individual < ActiveRecord::Base validates_presence_of :first_name, :last_name, :street, :city, :state, :zip validates_acceptance_of :AZ_resident, :message => "You must be an Arizona resident." end The AZ_resident field is present and defined as boolean (PostgreSQL 8.1), but validation will not occur.
2008 Jul 21
1
No password in reply
Found http://www.mailinglistarchive.com/dovecot at dovecot.org/msg03185.html, but I don't think this is my problem because using ldapsearch I can search using dovecot. # /usr/local/openldap/bin/ldapsearch -x -h localhost -b DC=XXXXX,DC=ce,DC=gov,DC=br -D cn=dovecot,dc=XXXXX,dc=ce,dc=gov,dc=br -w XXXXX -LLL -z 0 -E pr=100/noprompt dn: mail=rodrigo at XXXXX.ce.gov.br,jvd=XXXXX.ce.gov.br
2006 Apr 28
0
RE: Rails Digest, Vol 19, Issue 784
I am having a bit of trouble with the error. I hava a product and category table and wanting to display the categories in a drop down list. Below is the error I get. Any suggestion on how I can fix this. undefined method `name'' for #<Category:0x3652448> 9: <select name="product[category_id]"> 10: <% @categories.each do |category| %> 11:
2006 Jun 05
4
transactions
Can you give me some links where transactions in rails are explained in depth? Thank you PS: I''ve looked in google, but I just couldn''t find good articles, I''m working with postgresql Rodrigo Dominguez Iplan Networks Datos Personales rdominguez@iplan.com.ar rorra@rorra.com.ar www.iplan.com.ar <http://www.iplan.com.ar/>
2012 Jul 24
0
(no subject)
Hello People ! I?m using the new version Debian 6.0 (squeeze), so I configurate ldap and Samba. But when i try log in windows machine, i enter with user and password, after click, show the message for change your password, so come the message say: you not have permission to change the password. See mys commands: root at debian:~# smbclient -L localhost -U secretary Enter secretary's
2013 May 13
0
[LLVMdev] Q: When is a boolean not a boolean?
Jeremy Lakeman wrote: > A: When the types are created in different contexts. > > I've been running into a module validation error related to phi nodes > produced by the GVN pass, where the types of the incoming values aren't > the same instance of IntegerType i1. > > I'm not certain I've found the root cause of the problem yet, it's > probably due to my
2024 Jan 30
1
R interpreting numeric field as a boolean field
Dear friend Duncan, Thank you so much for your kind reply. Yes, that is exactly what is happening, there are a lot of NA values at the start, so R assumes that the field is of type boolean. The challenge that I am facing is that I want to read into R an Excel file that has many sheets (46 in this case) but I wanted to combine all 46 sheets into a single dataframe (since the columns are exactly