Displaying 20 results from an estimated 20000 matches similar to: "Model.create ignores id attribute"
2001 Feb 24
1
Urgent: unknown ID / metadata socket error
Dear tincerers-
Please help, I need to get this working *today* (ack!). I've installed
tinc 1.0p3 on two machines fully updated rh7, "stockton" and "lodi",
where "lodi" is trying to "ConnectTo" "stockton". When I start the tinc
daemens on each side, this is what i get in my logs:
Stockton:
Feb 23 19:07:57 srouter tinc.pacheart[2794]: tincd
2001 Feb 24
1
Urgent: unknown ID / metadata socket error
Dear tincerers-
Please help, I need to get this working *today* (ack!). I've installed
tinc 1.0p3 on two machines fully updated rh7, "stockton" and "lodi",
where "lodi" is trying to "ConnectTo" "stockton". When I start the tinc
daemens on each side, this is what i get in my logs:
Stockton:
Feb 23 19:07:57 srouter tinc.pacheart[2794]: tincd
2006 Jan 13
0
Form element that is not an AR object attribute
Fellow Railers,
I don''t know how to handle this kind of situation the Rails way, please help.
DB
----
create table products (id int not null auto_increment, name
varchar(255), primary key (id));
create table batches (id int not null auto_increment, product_id int
not null, quantity int not null, price decimal(10,2) not null, primary
key (id), foreign key (product_id) references
2005 Dec 15
4
Database best practices?
I started with rails a few weeks ago and I''ve been very impressed with
the whole framework. My first project after the cookbook was a small
application connecting to Postgres. This was originally a port of an
Access application so I was delighted with the new facilities for
constraint checks, triggers, etc.
As I started to write the front-end though I noticed myself rewriting
the
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have
article_groups as a jointable. Now I want to select every article who
is a member of group with id ''1'' and id ''2''. Whats best way to get
that?
Extract from schemas:
CREATE TABLE articles (
id int auto_increment,
ingress text NOT NULL,
story_text longtext,
constraint fk_items_users
2011 Sep 23
1
Anyone can create empty files (v 3.5.11)
I've mounted my cifs partition with a username and password and to
test whether I had my permissions right, I did:
$ sudo su testuser
$ touch asdf
touch: cannot touch `asdf': Permission denied
$
It says permission denied, but the `asdf' file is still created. I
can't write any data to it, but I can create empty files.
This is because in smbd/open.c if the file doesn't exist
2016 Jun 30
0
Sequential ID Git hook
I don't think we should do any of that. It's too complicated -- and I don't
see the reason to even do it.
There's a need for the "llvm-project" repository -- that's been discussed
plenty -- but where does the need for a separate "id" that must be pushed
into all of the sub-projects come from? This is the first I've heard of
that as a thing that needs to
2006 Aug 13
0
Custom id field auto_increment increment and offset?
Hi all,
in mysql, you can set the following environment variables:
set @@auto_increment_offset = 4;
set @@auto_increment_increment =10;
such that:
create table people (id int auto_increment primary key, name char(100));
insert into people set name=''Giuseppe'';
insert into people set name=''Laura'';
select * from people;
+----+----------+
| id | name |
2008 Feb 08
1
unwanted paragraph (syntax edge-case)
Hi list!
Take this markdown input:
* asdf
* asdf
* asdf
asdf
What I want:
<ul>
<li>asdf
<ul>
<li>asdf</li>
<li>asdf</li>
</ul>
<p>asdf</p></li>
</ul>
But markdown puts the first asdf into a paragraph. There is nothing I can do
2006 Apr 22
7
Proper Database Design For A Newbie
Hi all,
I am starting out learning Ruby on Rails (coming from a PHP background)
and I have a question about proper database design.
Let me give you a quick example of what I want to do:
Database:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`login` varchar(40) default NULL,
`email` varchar(100) default NULL,
`crypted_password` varchar(40) default NULL,
`salt`
2011 Mar 18
1
Bug using inline code blocks in nested lists?
Hi,
I am generating a nice document with some inline code blocks and came
around the following error:
1. asdf
- \` asdf `` `asdf` ``
produces:
<ol>
<li>asdf
<ul><li>` asdf <code><code>asdf</code></code> </li></ul></li>
</ol>
instead of:
<ol>
<li>asdf
<ul><li>` asdf
2008 Sep 17
2
bug in maruku with single-element nested unordered list?
This does not produce the expected output, yet does work on the dingus [1]:
* asdf
* asdf
>> require ''maruku''
=> true
>> doc = Maruku.new("* asdf\n * asdf\n")
=> md_el(:document,[
md_el(:ul,[md_el(:li_span,["asdf *
asdf"],{:want_my_paragraph=>false},[])],{},[])
],{},[])
>> doc.to_html
=> "<ul>\n<li>asdf *
2011 Jan 05
2
check, that a script is in a folder
$ echo ${PWD##*/}
somefolder
$ if "${PWD##*/}" -eq "asdf" > /dev/null; then echo "this is the asdf folder"; else exit 1; fi
bash: notthatfolder: command not found...
this is the asdf folder
$
So i just want to check that i'm in an exact folder. e.g.: "asdf"
What's wrong with my one-liner?
I just want to check, that a script is in a folder,
2007 May 18
1
naive question about using an object as the name of another object
This is a dumb question, but I'm having trouble finding the answer to this.
I'd like to do the following:
x<-"asdf"
and then have
the object x.y become automatically converted/represented as asdf.y (sort of
akin to macro variables in SAS where you would do:
%let x=asdf and do &x..y)
What is the syntax for having x represented as "asdf" in x.y ?
Thanks,
2006 Jul 19
2
Creating a safe sequence generator
Hi all,
I''ve got a rails and database question. Accounts have jobs, and job
numbers should be assigned per account. Account 89 should have jobs
1-whatever, which are not the same as account 67, which has jobs
1-whatever.
In the past, I have accomplished this quite easily with:
create table job (
accountid int(10) unsigned not null default 0,
jobid int(10) unsigned not null
2005 Dec 18
0
Difficulty with creatating a model
Hi everyone,
I''ve just started with Rails and Ruby. I just started to play one of
those RPG and to get my feet wet I''m writing an app to keep track of
item fusions. So the scoop is that item can be fused with another
items to create a higher level item. The higher level items can be
fused to create even higher level items ... etc.
I''m using MySQL to store the data.
2011 Jan 02
3
variable in loop
$ ASDF=hello; a=0; a=$(( 70 - $(echo $ASDF | awk '{print length}') )); echo "$a $ASDF"$(for i in {1..$a}; do printf "."; done)
65 hello.
$
Why doesn't it print:
65 hello.................................................................
What am i missing?
2016 Jun 30
6
Sequential ID Git hook
Now that we seem to be converging to an acceptable Git model, there
was only one remaining doubt, and that's how the trigger to update a
sequential ID will work. I've been in contact with GitHub folks, and
this is in line with their suggestions...
Given the nature of our project's repository structure, triggers in
each repository can't just update their own sequential ID (like
2008 Nov 01
0
Overloading #initialize in a model
I''m using WhinyProtectedAttributes:
http://henrik.nyh.se/2007/10/whiny-protected-attributes
Say I have this model:
class Person < ActiveRecord::Base
attribute_accessible :name
end
If I then create a Person with an invalid attribute, an exception is
raised. For example:
Person.new :name => ''Bob'', :asdf => ''asdf''
What I''d like to
2007 Oct 07
10
Rails to English
I am currently using the book "Agile Web Development With
Rails" (2005). I am working on a fully function web application that
has a shopping cart.
The web page displays this,
ActiveRecord::StatementInvalid in AdminController#create
Mysql::Error: #23000Column ''date_available'' cannot be null: INSERT
INTO products (`image_url`, `date_available`, `price`, `title`,