similar to: Scaffold and foreign keys

Displaying 20 results from an estimated 1000 matches similar to: "Scaffold and foreign keys"

2008 Jan 11
3
Date range queries return zero results
Hello, I am having trouble getting data ranges to work correctly. I am using the following command to load the db: index << {:title => row[7].to_i, :date => Date.strptime(row[3], ''%Y-%m-%d''), :page_id => row[5].to_i, :page => row[6].to_i, :content_type => row[1].to_i,
2006 Aug 14
4
Controller method problem
Hi, I have a def in my controller see below where i want to find the page object based on a parameter value and then use the page_id to then find all the contents that belong to that page in the same method. Controller def aboutus @page = Page.find_by_name(params[''About Us'']) @contents = Content.find(:all, :conditions => "page_id = #{@page.id}") end
2006 May 10
4
Single Table Inheritance problem
I have two tables I am using single table inheritance with: Page and Item. "Page" has many "Items"; "Item" belongs to "Page". Item Model: class Item < ActiveRecord::Base end class Article < Item belongs_to :page end Page Model: class Page < ActiveRecord::Base end class Issue < Page has_many :articles end In my controller, when I
2006 Jul 06
2
Scaffold with Foreign Key fields possible?
When you do a scaffold, is there a fast way to force it to let you enter in data for any foreign/primary key fields? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jan 13
4
missing foreign key fields in scaffold views
Is there any reason that foreign key fields do not show in any of the scaffold views ? project table: id serial primary key, category_id integer, user_id integer, name varchar, morestuff varchar foreign key (category_id) references categories(id), foreign key (user_id) references users(id) scaffold generated views only show name, morestuff fields
2006 May 31
7
Rails, Transactions, and statements
Hi, I have a problem where I need an auto-incremented id back from the database for a statement that has yet to be committed. The operation that uses the id may fail, and if so, I need to rollback the database. I can''t figure out how to send only the statement to the database without the commit without sending over hard coded SQL. This is what I started out with: 1 def add_album
2010 Jul 12
2
(no subject)
Stupid question, but could someone please tell me how to get off this mailing list? Thanks.
2006 Jun 20
2
about fw classifier
Hi all! On http://lartc.org/howto/lartc.adv-filter.html I read that a classifiers available bases the decision on how the firewall has marked the packet and on http://lartc.org/howto/lartc.qdisc.filters.html the following example: "tc filter add dev eth1 protocol ip parent 1:0 prio 1 handle 6 fw flowid 1:1" "iptables -A PREROUTING -t mangle -i eth0 -j MARK --set-mark 6" My
2006 May 16
5
Google Map problems
I followed the setup from http://cartographer.rubyforge.org/ but keep getting this error - NoMethodError in Sandbox#map Showing app/views/layouts/sandbox.rhtml where line #4 raised: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.[] Extracted source (around line #4): 1: <html> 2: <head>
2012 Mar 03
4
Hardware-based Icecast source client
Hi all, I'm in the midst of creating a turnkey Icecast source client embedded in a plug computer, using Ices2. I've hacked together some scripts to automate the starting and stopping of a live stream (launched by pressing buttons on the device). It's dead easy once the network/server is configured - you just plug it in, push a button and you're live. It accepts any Debian
2017 Mar 18
2
dovecot problem with ssl
Em Thu, 16 Mar 2017 23:06:08 -0700, Doug Barton escreveu > On 03/17/2017 01:21 AM, Nilton Jose Rizzo wrote: > > > > > > Hi all, > > > > > > I already searched for this error on google and nothing > > > > I never install dovecot, this is a first time. > > > > This error, I know, is too newbie and stupid, but I > >
2017 Mar 18
2
dovecot problem with ssl
On 2017-03-18 07:19, Nilton Jose Rizzo wrote: > Em Fri, 17 Mar 2017 22:35:40 -0300, Nilton Jose Rizzo escreveu >> Em Thu, 16 Mar 2017 23:06:08 -0700, Doug Barton escreveu >> > On 03/17/2017 01:21 AM, Nilton Jose Rizzo wrote: >> > > >> > > >> > > Hi all, >> > > >> > > >> > > I already searched for this
2009 Feb 26
3
Question about Do Not Disturb
Hello, Some of my users have phones lacking a DND button. I need to provide an extension they can dial that will put them in DND, i.e. tell the server not to send them any calls until they get off the DND. I've researched it for almost 3 days now and tried a range of configurations. I'm hoping somebody here has an answer. Currently, I have this in extensions.conf [app-dnd-on]
2006 Apr 21
5
installing hieraki help
Ahoy, I tried to install hieraki and it was a big mess. 1) upload_progress module needed to be installed 2) no test/development server configured in the config file so i had to add those 3) no log directory, had to add that 4) had to install 2 gems (ok fine) 5) once the server started, go to homepage and " NameError in Wiki/pageController#index uninitialized constant Node RAILS_ROOT:
2005 Jul 05
1
Re: LARTC Digest, Vol 5, Issue 6
I''m not an expert, but I can tell you that when traffic shaping on a router, you can just shape egress both ways and not mess with imq. My script is at http://www.stardotstar.org/?page_id=63 The basis are the following 2 lines where UPDEV is ppp0 and DOWNDEV is eth0 in your case. tc qdisc add dev ${UPDEV} root handle 1: htb default 100 r2q 1 tc qdisc add dev ${DOWNDEV} root handle 1:
2006 Jun 20
2
yum install nagios, adding dag repository
Hi, I'm running an Opteron 64 bit server, and in an effort to re-join it to my nagios monitoring, I have tried the install nagios via Yum. When I type: yum install nagios, or nagios-nrpe, or nagios-plugins, I get: "Nothing to do". as output. In wanting to add the DAG repository to my machine, the documentation i've come across seems vague. Can someone advise me on either of
2006 Mar 15
10
Scaffold with Foreign Key
I have two tables: ------------------------------ drop table if exists users; create table users ( id int not null auto_increment, username varchar(100) not null, password varchar(20) not null, firstname varchar(20) not null, lastname varchar(20) not null, primary key (id) ) TYPE = InnoDB; ------------------------------ drop table
2007 Aug 08
25
Problems with RESTfully generated helpers
I am using helper the RESTfully generated helper methods in my views. My routes are nested so the helpers appear to need arguments passed to them, but it works without arguments. Say for example I have pages and comments. If I do page_comments_path without parameters, it works. However, when I run the rspec test, it fails and tells me i''m missing parameters. I tried to pass
2011 Aug 13
3
Echo problem in the analoge lines
Hi All; To overcome the echo problem, what mainly I have to do in the configuration other than the following line in the system.conf under dahdi directory? echocanceller=mg2,1-16 1) How can I know if the digium card supporting echo cancellator? 2) If I am getting a message in the consol that unable to enable the echo cancelator, then what does it means? The hardware is not supporting echo
2015 Jan 07
3
[LLVMdev] [RFC][PATCH][OPENCL] synchronization scopes redux
On 1/7/2015 8:59 AM, Chandler Carruth wrote: > > Essentially, I think target-independent optimizations are still > attractive, but we might want to just force them to go through an > actual target-implemented API to interpret the scopes rather than > making the interpretation work from first principles. I just worry > that the targets are going to be too different and we may