Displaying 20 results from an estimated 3000 matches similar to: "Custom id field auto_increment increment and offset?"
2007 May 24
1
Search scoping in acts_as_ferret
Hello,
I am exploring acts_as_ferret, and the first question that pops to mind
is scoping, i.e. how to restrict searches in various ways.
For example, I have a Post model with title, content, and user_id as
attributes, and I want users to be able to search through their own
posts only.
Normally, of course, I would do
Post.find(:all, :conditions=>["user_id=?", current_user],
2006 Jul 10
2
use auto_increment before data is stored
Hello,
I have 2 models (category with id(auto_increment), name and item with
id(auto_increment), category_id, name).
But I want to store the data with only one form that creates a new
category and the corresponding items at the same time.
My problem is now that I don''t know how to tell Ruby to fetch the
auto_increment id of the category table and then use it for the
category_id of the
2006 Mar 01
2
Oracle auto_increment ??? & Rails
To make a new istance of an Oracle table with Rails, i need that this
table had a column named ''id''. This ''id'' must be Primary Key &
auto_increment;.
How Can I modify the ''id'' properties to do it Auto_increment in Oracle?
--
Posted via http://www.ruby-forum.com/.
2007 Nov 15
4
Using .find_by_sql for database/admin queries
I want to create an internal admin view to display the output of "show
variables" from mysql. What''s the best approach do this?
For example, I''m doing something like this:
@variables = ActiveRecord::Base.find_by_sql "show variables;"
Then, I get stuff like this back (227 elements in @variables) in
script/console:
>> @variables[0]
=>
2006 Jan 23
4
won''t auto_increment
I am writing my first RoR ap and am having problems with ActiveRecord''s
basic functions. The first one is that the id column is not auto
incrementing. I can add one record but after that it says,
"Mysql::Error: #23000Duplicate entry ''0'' for key 1"...
b
--
Posted via http://www.ruby-forum.com/.
2009 Apr 11
0
migration oracle auto_increment
I have a schema for ~15 tables in MySQL. I need to migrate it to Oracle
though I''ve never used Oracle before. I see that Oracle doesn''t have an
auto_increment built in. One must create a trigger table for each
auto_incrementing id. I''m contemplating translating my MySQL schema
into a Ruby migration script.
Do you know if Ruby migrations will generate enough SQL to
2006 Jun 04
0
auto_increment disappearing
Is anyone else experiencing this? My MySQL tables seem to randomly lose
their auto_increment attribute on the id field...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060604/eebfd479/attachment.html
2006 Feb 27
6
One to Many example... please!
Hi,
I am pulling my hair out trying to work out how to put together what
should be a simple app in rails. The app is to CV''s so I have a table of
CV''s and each CV can have multiple skills. Skills are in a 2nd table
below;
CREATE TABLE cvs(
id INT not null AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(30) not null,
family_name VARCHAR(30) not null,
email
2006 Aug 08
2
Should I uninstall everything to install InstantRails?
Please help me I am brand new to this.
I have been following this tutorial from OnLamp
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html
which tells you how to install ruby, rails and mySQL and get going.
Doing this tutorial convinced me RoR was the way to go for me.
So I got hold of this e-book:
Agile Web Development with Rails - The Pragmatic Programmers
The book tells me to install
2005 Mar 04
2
Part 2 of ONLamp.com Rails article is online
ONLamp.com has finally published part 2 of my Rails article! You can find it
here:
http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html
It would be really nice if we could get this slash dotted again before the
weekend.
>From what I understand, you''re more likely to get accepted when multiple
people submit something. So, to anyone who has the inclination: if you would
submit
2003 Sep 11
0
RV: WARNING[5126] Maximum retries exceeded on call
Hello
I'm tryng to install Asterisk and by now I got a first congfiguration
working
(0ne PBX box and 2 X-lite phone communicating with each other)
The problem now is that I keep this annoying message every time:
WARNING[5126]: File chan_sip.c, Line 435 (retrans_pkt): Maximum retries
exceeded on call
43c827415f83584c0c9dc15b03ed6924@10.1.1.1 for seqno 102 (Request)
Do you have a
2006 Mar 09
3
ONLamp.com Tutorial Trouble
I have installed Ruby on Rails and the latest version of MySQL in my
Windows XP machine and I am following a demo from ONLamp.com
<http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3>. I am
3/5 down the page where it says:
"Open a browser and navigate to http://127.0.0.1:3000/recipe/new. You
should see something like Figure 32."
Instead of a page like Figure 32, I get
2008 Apr 18
1
rails for dummies
Hellos all,
I''m new to this so I have one really stupid question. When I make my
website is the whole thing going to be encoded in
my_test_controller.rb if I do ''ruby script\generate controller MyTest''
as "ONLamp" says to do?
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2
Cheers,
Paul
--~--~---------~--~----~------------~-------~--~----~
2014 Jun 23
4
[PATCH] Support for ASEM UPS on Linux/i2c
On 18/06/2014 04:17, Charles Lepple wrote:
> On Jun 13, 2014, at 2:53 AM, Giuseppe Corbelli <giuseppe.corbelli at copanitalia.com> wrote:
>
>> As said in previous mail, I just finished a first working version of a driver for the UPS found on ASEM PB1300 device
>> (http://www.asem.it/prodotti/industrial-automation/box-pcs/performance/pb1300/)
>> Linux only, accessed
2018 Jan 19
0
Internal DNS logging
Hi Giuseppe,
>
> I was looking for the option 'dns:x' in the wiki but I didn't find it.
> Now it works.
>
> I used
>
> log level = 3 auth:3 dns:0
>
> auth_audit:3 gives me unknown class message
it must be only available in 4.7. The last increment 4.7.4 is production
ready (we've got it deployed on dozens of DCs) and has many nice
improvements over
2014 Jul 14
2
[PATCH] Support for ASEM UPS on Linux/i2c
On 07/07/2014 15:03, Charles Lepple wrote:
> Giuseppe Corbelli <giuseppe.corbelli <at> copanitalia.com> writes:
>
>> Nevermind, please try the one attached, just created by
>>
>> git diff -p 80d9534 configure.ac data/driver.list.in drivers/Makefile.am
>> drivers/asem.c > asem.patch
>>
>> Just applied it on current master
2004 Jan 23
0
New Asterisk article on O'Reilly's onlamp.com
Here's the follow-up article to the first article I published on Asterisk:
http://www.onlamp.com/pub/a/onlamp/2004/01/22/asterisk2.html?page=last
This one covers getting Zap hardware installed, and also covers
integrating an IPCSP (IP Communications Service Provider - aka: long
distance via SIP.)
Sorry for the delay - the article was submitted about five months ago
and just finally
2008 Jun 24
0
creating a list view in rails 2
just started learning ruby and RoR a few days ago. There aren''t many
tutorials on Version 2 so I went with a version 1 one.
I''m going through the ONLamp one, found here:
http://www.onlamp.com/pub/a/onlamp/2007/01/05/revisiting-ruby-on-rails-revisited-2.html?page=1
I got the scafolding and db stuff sorted out (as in the way its meant to
be done in version 2) but I noticed that in
2007 Feb 04
1
Rails-Mysql driver installation problem? - newbie
I''m a newbie trying to follow the ONLamp RoR tutorial at http://
www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1
Originally, I forgot to install the MySQL driver. It took a while to
get a driver installed using gem, but eventually I got mysql-2.7
driver installed after downloading some ruby dev headers and mysql
client library.
Now, when I try and point the browser to
2018 Jan 19
4
Internal DNS logging
Thanks Denis,
I was looking for the option 'dns:x' in the wiki but I didn't find it.
Now it works.
I used
log level = 3 auth:3 dns:0
auth_audit:3 gives me unknown class message
But where I can find a complete list of classes for log level?
I'll also give a try on the last version of samba with json.
Thanks again
Giuseppe
On 1/18/2018 4:52 PM, Denis Cardon wrote: