Re: [Rails] id NOT IN (?)

2012-09-18 Thread daynthan kabilan
Dear Walter sorry for the delay reply. am using rails 2.3.11 am using your condition by @users = User.find(:all, :conditions=[id NOT IN (?), @issues.map(:id)]) that time also i got both output and i got the correct output for this condition. :conditions=[id not in (?),issues] and thanks

Re: [Rails] id NOT IN (?)

2012-09-15 Thread Walter Lee Davis
On Sep 15, 2012, at 2:01 AM, daynthan kabilan wrote: Hi i have 2 table users and issues I need daily report . all users are give a status to everyday. i got it in 2 line. But i need leave users also. If i use 1st def method i got user status list and all users no record fields.

[Rails] ID value after AR.save ?

2010-11-04 Thread Greg Willits
Rails 3 / MySQL I've never used autoinc (always provided my own random IDs), but now I have to adapt to a legacy database using autoinc IDs. Assuming the use of an autoinc ID field, I've read that after an ActiveRecord model is saved for the first time, the ID value is known to the model right

[Rails] id of new object dynamically created in a nested form

2010-04-26 Thread ES
In my nested form I have a link to open a popup with selections. When a selection is made, the popup closes and the selection is added to a text box. Because I have objects that can be dynamically created in the form I can't just use the id of the object to assign the selection to the input text

Re: [Rails] id upper bounds

2010-04-19 Thread Franz Strebel
On Mon, Apr 19, 2010 at 5:48 AM, Eric B. li...@ruby-forum.com wrote: I am new to both ruby and rails and a recent project I am trying has got me working on it. I am trying to find a nice easy lightweight way to find the last 'id' in a mysql database so I can take it and use it as the upper

Re: [Rails] id upper bounds

2010-04-19 Thread mike
On Mon, Apr 19, 2010 at 5:48 AM, Eric B. li...@ruby-forum.com wrote: I am trying to find a nice easy lightweight way to find the last 'id' in a mysql database That depends on the Datatype of your ID column in the table. It is a Mysql specific question. By rails default these are signed

[Rails] id upper bounds

2010-04-18 Thread Eric B.
I am new to both ruby and rails and a recent project I am trying has got me working on it. I am trying to find a nice easy lightweight way to find the last 'id' in a mysql database so I can take it and use it as the upper bound in a random number generator. My problem is that I haven't found an

[Rails] :id vs. a_id:

2010-01-20 Thread byrnejb
I have a controller a_bs_controller that usually has to find A by a_id:. So, among others, it has these methods: def update this_a . . . end . . . def this_a @a = A.find(params[:a_id]) end My difficulty arises in that sometimes this controller is passed :a_id in a nested hash as

[Rails] ID not primary key with not unique values

2009-05-26 Thread pepe
Sorry for the re-post. Nobody has even answered no, can't do. I have an ID column in a legacy table of type STRING and could contain not unique values. Is there a way of disabling the convention of ID being the primary key? How can I assign the values I need to the ID column without using SQL,

[Rails] ID and Archiving in Rails

2009-01-09 Thread manohar amrutkar
Hi All, I have created a table record_archives using engine=archive in my application to archive data for a table records. I want to insert data into archived table at specific time, like once in a week. I have created model for that table but not used any migration and directly created a table

[Rails] ID size

2008-11-06 Thread Petan Cert
Hi, does anyone know how big is the default Id, when we are creating a new table? I mean its size. int(11) for example. Thx guys. Petr -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] id in form_tag for update

2008-09-16 Thread Pål Bergström
I get an error saying Rails can't find the post because I don't have an id when doing the update. I have: % form_tag '/meetings/update', :id = @calendar.id, :onsubmit = 'return ValidateMeeting()' do % Is this wrong? -- Posted via http://www.ruby-forum.com/.