similar to: Am I going too far or Rails is just confusing? was {validates_presence_of *_id attributes}

Displaying 20 results from an estimated 5000 matches similar to: "Am I going too far or Rails is just confusing? was {validates_presence_of *_id attributes}"

2004 May 10
3
sqlSave with underscores in table fieldname
Hi group, I try to write a frame to a table (RODBC). I use colnames(temp6) <- c("ind_id","ser_id","period_id","year","calc","mean") sqlSave(channel, temp6, tablename = "series_indices_test",append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -999999, fast = FALSE) This is giving me an error: Error in
2006 Jan 03
4
validates_presence_of *_id attributes
Hi all, I am a newbie to Rails. Please enlighten me on how to do this appropriately, the Rails and the Ruby way: Suppose I have a Recipe model. Let''s simplify things and pretend that it has only 2 attributes, a :name and the other is a ''category_id''. In the recipes table, category_id is a foreign key to field id of table categories. We also assume that I have generate
2013 Apr 18
5
Dynamic realtime + queues
Hi, ? I am trying to store queues.conf to a MySQL database using dynamic realtime. I have a working ODBC connection and the queueing system already works but I want to store the queues.conf file to a database. I am following the guide from Asterisk the definitive guide, the ebook can be found at: http://ofps.oreilly.com/titles/9781449332426/asterisk-DB.html ? I have a database called asterisk
2006 Jan 04
1
[SOLVED] Am I going too far or Rails is just confusing?
On 1/4/06, John Indra <ji.milist@gmail.com> wrote: > However, it doesn''t work for me. Following your article, I change my I have found the source of the problem. I follow the solution provided by http://blog.teksol.info/articles/2006/01/03/belongs_to-user-interface-take-ii It''s a nice solution, however it contains typo :) There is indeed no error_messages_on method,
2005 Dec 12
2
count sql failing with unknown table....
Hey Rails People, I''m doing my first Rails app and I''m having a newbie problem with the count method.... Mysql::Error: #42S02Unknown table ''jobs_sectors'' in where clause: SELECT COUNT(*) FROM jobs WHERE (jobs_sectors.sector_id = 1 ) Extracted source (around line #4): 1: <div class="sectors"> 2: <ul> 3: <% for sector in @sectors
2008 Jun 02
5
validate - message in the flash[:error]
Hi, I want to show the validate - message in the flash[:error] - field but I can''t find any options. An example: class UserPermission < ActiveRecord::Base validates_presence_of :name, :message => "Please insert a name" ... | end V flash[:error] = "Error - " Has anybody a solution for this
2009 Jan 09
3
What is wrong with validates_presence_of :my_association ?
Category.has_many :products Let''s say a product must belong to a category. I know it is recommended to do the following: class Product validates_presence_of :category_id end But, as we all know, this is a pain for new records, meaning what if the associated category is a new record? I''ve been meaning to ask this, but what''s wrong with doing the following: class
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
2006 May 13
1
Rake clone bug?
Hi. I''m having a problem with my testing. The following table in my development database (MySQL 4.1.12, InnoDB): +-----------------------+------------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------------+------------------------+------+-----+---------+----------------+ |
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''.
2019 May 31
3
sieve setup. no svbin ?
On Fri, May 31, 2019 10:18 am, Ralph Seichter via dovecot wrote: > * Voytek Eymont via dovecot: > Try runing "sievec -u {your_linux_user} /path/to/whatever.sieve" from a > shell and check the resulting error messages. Raplh, thanks so, am I'm missing sql lookup for sieve...? # sievec -u voytek dovecot.sieve sievec(voytek)<9667><>: Error: user voytek: Auth
2006 Nov 13
1
error_messages_on
With the helper "error_messages_on", if a method, "price", for example, has 2 errors (numericality and presence), how can I access on both errors? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to
2006 Aug 05
3
Four Days on Rails
I''ve been reading the tutorial and I have problems with the TinyInt(1) for the attribute "item.done". I thought this thread would be the best to post it. I''m using Rails 1.1.14. When in the partial template _list_stripes appears: <%= list_stripes["done"] == 1 ? show_image("done_ico.gif") : "&nbsp;" %> it always returns the
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
2005 Jul 07
3
NameError Exception
Ruby/Rails n00b here so go easy on me... I''ve been wracking my brain trying to figure out what is wrong here. I''ve checked all my models for the appropriate belongs_to, has_many, etc. I''ve checked to make sure I''m using singular and plurals in the right spot. I''ve checked my syntax around all my "within"''s and nothing seems to fix
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
2019 Mar 03
2
migrating/cloning 2.2 > 2.3?
I have 2.2 installation on Centos 7, and, I'm trying to setup a new server, and, 'clone' existing setup: Dovecot/Postfix/Mysql on new Centos 7 installed from RPM 2.3.4.1 (3c0b8769e) I then copied/overwrote from old to new /etc/dovecot/*.conf (but not conf.d files), created self certs in place of old server certs and, started Dovecot is that totally dumb, and, how should I do this,
2009 Mar 23
2
rails boolean and mysql tinyint(1) question?
this may seem silly but i just noticed that if in mysql the column which is a tinyint(1) happens 2 or greater, by a chance of glitch or corruption in the database(i did it manually ofcourse but i am speaking hypothetically), rails would see it as false. but i find that really wrong seeing how in mysql it sees any non-zeroes as true. i really think if it does happen to be any number other than 1
2006 Mar 25
3
validates_presence_of validation order?
I have a form with 3 fields: user_id, email and password. All 3 fields are required, so I have a "validates_presence_of :user_id, :email, :password" in my model. Works, but the validation errors show up in a different order than I specificed in the validates_presence_of statement. Is there a way to specify the order in which the validations (and corresponding error messages) should
2006 May 18
1
Introspection of validates_presence_of
Hello all. I don''t know how to get all symbols passed to method validates_presence_of in model. I''ve trying to use following solution: class News < ActiveRecord::Base validates_presence_of :title, :text def validates_presence_of(*attr_names) @@obligatory_fields = attr_names ActiveRecord::Base.validates_presence_of(*attr_names) end def obligatory_fields