Displaying 8 results from an estimated 8 matches for "emulate_booleans".
2010 Jan 09
3
tinyint(1) and boolean
So i had a boolean attribute in my model which gets interpreted to
tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a
range in mysql and i want to change my boolean attribute to an
attribute which can accept 3 values(0,1,2).
I made the change to the view and when i post the form selecting the
selecting the value ''2'', it still gets saved as a ''0''.
2005 Oct 03
3
Boolean quoting, postgresql
http://dev.rubyonrails.org/ticket/1117
I''ve attached a patch to ticket 1117 which fixes it so that booleans
are escaped as booleans, not integers. Specifically, this situation
will now work
find_all(["send_date=? and sent=?", Date.today, false])
Which matches peoples expectations, but it causes some problems with
the postgresql unit tests. Specifically, the use of
2008 Aug 28
2
1 or true in TINYINT(1) column?
Hello, there is a table that has a column TINYINT(1) called status.
Through mysql console I see its value as 1 (when is true) but if I do
this in Rails console:
Mytable.status
=> true
give me "true" rather "1".
How could I change 1 to true using some method?
Or true to 1?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2007 Mar 05
1
ODBC Adapter woes
Hi All,
I am running into a little issue the ODBC adapter:
rails: 1.2
ruby: 1.8.4
ODBC ruby binding: .0997
Rails ODBC adapter: 1.4
I have added the ruby bindings to the /ruby/1.8/i386-msvcrt
and used gem to install the ODBC adapter
I updated the enviroment.rb
when I run
ruby -e ''require "odbc"'' it appears to correct (no error response)
1. Is my understanding
2006 Apr 04
9
Does ActiveRecord have support for "Boolean" columns?
Hey all --
I''ve been using enumerable char(1)''s with ''y'' and ''n'' values for my
Boolean columns in Rails, but it strikes me there should be a better
way.
How do you setup columns that represent true/false-ness in your
schemas on Rails?
Wondering what kind of standard approaches there are other than me
writing something like
class MyEntity
2008 Jul 04
1
datatype problem when using ActiveRecord with Oracle
...ass or TrueClass. I tried to find
the source of the problem and I found oracle_adapter.rb (http://
www.koders.com/ruby/fidAF6400E299159A198A4064173CF305C895FCA945.aspx?s=%22Michael+Schoen%22#L5)
has a method ''simplified_field'' that has a line
"return :boolean if OracleAdapter.emulate_booleans && field_type ==
''NUMBER(1)''".
I tried overriding this method on my environment.rb and commented out
this line. This problem is solved but I have another field of type
''Interval'' which has to get mapped to String, but instead gets mapped
to Fixnum wh...
2007 Aug 03
2
my number column returns boolean values
Hi everyone,
I''m working on a new rails project and have to build it on top of a
legacy oracle database. I''m trying to figure out how to get the
number value from a NUMBER(1) datatype. So far I''m only getting a
"true" value for 1 and "false" for any other number. From the console
I can print out my object values and can see that there are number
2007 Mar 05
6
Using ms access 97 as local db backend for rails on windows 2000
Hi,
I am on a windows 2000 machine and want to use an ms access 97
database (*.mdb) as db backend.
I did a clean install: ruby, gems, rails, odbc-rails. A test rails
application connecting to a local mysql server is doing fine. I can
also locally connect to the odbc connection "local_odbc_name" with the
aqua data studio client.
But now with rails. As soon as I change the adapter to