similar to: Scaffold with Foreign Key

Displaying 20 results from an estimated 8000 matches similar to: "Scaffold with Foreign Key"

2009 Jul 04
3
scaffolding
hi , i used the folllwing command to scaffold, G:\my\webblog>ruby script/generate scaffold webblog id:integer title:string body :text created_at:datetime after when i migrate with the follwing command rake db:migrate i got the error as (in G:/my/webblog) == 1 CreateWebblogs: migrating ================================================ -- create_table(:webblogs) rake aborted! Mysql::Error:
2006 Sep 29
1
newbie Q: it won't display foreign keys...
I have two tables CREATE TABLE continents ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE countries ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, continent_id int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; I generate scaffolds for country and for
2006 May 04
9
Help: wrong number of arguments (0 for 1)
Is it my environment? Is something wrong, cause I thought this should just work? I have a simple table and I created a model and a controller: ruby script/generate controller Restaurant ruby script/generate model Restaurant I edited the controller to this: class RestaurantController < ApplicationController scaffold :Restaurant end I run it and: http://0.0.0.0:3000/Restaurant works fine,
2006 Oct 31
4
Auto-increment lost during migration.
Hi. I get some strange results when using rename_column on a primary key in a migration. It seems like the migration script removes the auto-increment property if you rename a column. This is a minimal example. create_table :foo, :primary_key => :foo_id do |t| t.column "name", :string end # renaming the primary key makes auto-increment disappear. rename_column
2005 Dec 23
4
OO model style: inheritance
Hi everybody I am totally new to rails and I am trying to start a tiny project to get familiar with rails. But I already got my first problem and I would be happy if somebody could point me in the best and cleanest direction. I am trying to develop a small gallery app. Since I would like to add more features in future I am trying to design a clean OO architecture of my models: The base object
2006 Aug 02
2
many-to-one relationship, do I need a second table?
Ok, to keep things short. Im wondering if I need a secondary relationship table to handle my many-to-one relationships. Here is an example of what I''ve written down. For instance say I want to find all of the people in a given location. class Location < AR:Base has_many :people end class Person < AR:Base belongs_to :location end My SQL tables look like: CREATE TABLE
2009 Aug 31
3
Migration - wrong SQL statement is created
Hi, I am doing my first steps with RoR and I have the following problem: I execute my migration file with the following content on a MySQL-database via Rake: <code> class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.integer :id t.string :username, :size => 100 t.string :password, :size => 100 t.string :email, :size
2005 Sep 13
5
acts_as_taggable 1.0.4 now gemified!
Hi Folks, The acts_as_taggable mixin is now available as a shiny gem. More details here: http://dema.ruby.com.br/articles/2005/09/13/acts-as-taggable-gemified This release features some cool additions as well. Cheers Dema -- http://dema.ruby.com.br - Rails from a .NET perspective
2006 Apr 22
9
one to many question
1. A category has parent categories. 2. A product is in many categories and a category has many products. 3. Products and category both have images in the same image table. ie. a product and / or category could have multiple images.<=== my question is related to this So among other things I presume I have to do the following: class Category < ActiveRecord:Base #...
2015 Jul 06
4
CDR in an MySQL-Database
Hi list! I'd like to save all information about calls (CDR) in a MySQL-Database. I created the DB and a user for Asterisk on a separate server, then I configured my cdr_mysql.conf so: [global] hostname=192.168.10.3 dbname=asterisk table=cdr password=MYSECRET user=asterisk port=3306 and my cdr.conf so: [general] enable=yes unanswered = yes safeshutdown=yes [mysql] usegmtime=no
2006 Jan 26
9
Problem with schema_db_import on Site5?
Hello, I am trying to put my rails app on a host .So I presume the method to do this is to first do rake db_schema_dump and then copy it to the host and do rake db_schema_import. I use mySQL Ver 14.7 Distrib 4.1.14, for pc-linux-gnu (i686) using readline 4.3 ** Invoke db_schema_import (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db_schema_import rake
2008 Apr 30
4
Beginner mysql problem
I am new to rails and have come across a problem with a sample application I was working on. When trying to use rake migrate I got the error listed below. my db file contains the following class ContactDb < ActiveRecord::Migration def self.up create_table "people" do |t| t.column "id", :integer t.column "name",
2015 Mar 18
2
Asterisk 13. Writing call quality parameters to CDR. How?
Hello. Voice quality when calling - this is one of the most important in the PBX. You need to record the quality parameters for each call to improve. Because the overall quality of a call can only be determined upon completion, I did it in the HangUp handler and wrote in custom fields of CDR. This worked well in asterisk 11. In asterisk 13 I did not find a handler after the call, but before
2008 Sep 04
3
MySQL connection collation
Hi! I have ran on problem with collations. In database.yml I have set: encoding: utf8, but when in console run: >> ActiveRecord::Base.connection.collation => "latin1_swedish_ci" It is Rails 2.1, mysql gem 2.7, mysql 5.1.22. This leads to errors like: Mysql::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation
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 Oct 11
11
Reporting for Asterisk Call Center
Dear Tariq; About elastix.org, this can be use with Asterisk or it is coming as a complete IP Telephony, Call Center, IVR and Reporting? Because, I do not need to install another IP Telephony on the server which already has asterisk which is an IP Telephony, this will cause a problem in the service (for example, when listening for SIP port of 5060).
2015 Jul 06
1
CDR in an MySQL-Database
-----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of jg Sent: Monday, July 06, 2015 4:14 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] CDR in an MySQL-Database > Hi list! > > I'd like to save all information about calls (CDR) in a MySQL-Database.
2006 Jul 04
1
LoginGenerator Problem
I am trying to make a barebones login system based on this example (which in turn is just standard RoR login) but when I enter a user name and password, it says the login is unsuccessful every time. I am not sure where I am going wrong. Here is all relevent information CREATE TABLE `users` ( `id` int(6) unsigned NOT NULL auto_increment, `login` varchar(20) NOT NULL default
2010 Feb 16
2
wrong number of arguments (Wrox Beginning Ruby On Rails)
I''m reading a book "Beginning Ruby on Rails" I made an table, and tried to make an Model class. But it doesn''t work. I made the table as below. mysql> show columns from books ; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra |
2005 Jul 05
2
Salted hash login generator (verification problem?)
Hi all, I hope someone can help with what is probably a simple newb installation mistake on my part. I''m having a couple of problems with the salted hash login generator. I installed it following the quickstart guide, and the unit tests work like a charm. There are two errors and a failure on the function tests, though; the verified field seems to be involved in at least one of