Displaying 20 results from an estimated 1000 matches similar to: "Foreign-key confusion"
2006 Apr 02
1
One to Many Relationship Issues
Hi,
I am having issues with a one to many relationship(it never works :-)).
Jokes aside, I am getting an error:
Mysql::Error: #23000Cannot add or update a child row: a foreign key
constraint fails: INSERT INTO adverts (`image_url`, `price`, `title`,
`website_url`, `description`, `user_id`) VALUES(''bb'', 22.0, ''aa'',
2006 Aug 12
2
Ferret Issues
Hi,
I have installed the ferret gem (on WIN XP). My search and result view
is working, but it comes back with empty results all the time. It seems
like ferret is building the index (there is 3 binary files in the index
directory).
If I add the line:
acts_as_ferret :fields =>
2006 Aug 12
4
Ferret Wierdness
Hi,
I have installed the ferret gem (on WIN XP). My search and result view
is working, but it comes back with empty results all the time. It seems
like ferret is building the index (there is 3 binary files in the index
directory).
If I add the line:
acts_as_ferret :fields => [''title'',''description'',''price'',''website_url'']
2011 Jan 03
8
Heroku, needs constant AppController updates?
Dear All,
Fairly new to rails and Heroku, so could be doing something wacky - do
let me know if you think my code practice is off, even if unrelated to
this error, I''d like to learn!
I''m using Rails 3.0.0, ruby 1.8.7, and ''sqlite3-ruby'', ''1.2.5'', :require
=> ''sqlite3''.
I''ve got an application that goes off and
2007 May 20
9
How to test for exceptions
Hi folks,
I''m in the process of converting a Test::Unit functional test to RSpec, but I''ve run into a slight problem. I tried looking through the documentation but I still don''t know what I missed.
Thanks in advance,
Blake
describe VenuesController, "on update" do
before(:each) do
@venue = mock("venue")
2005 May 13
17
modeling...
I''ve tried tackling this many ways on my own and can''t find a good solution:
Breaking it down to something simplier...
Venue
has one address
Person
has one address
Address
belongs to state
Assuming I don''t want to do tables for venue_addresses and person_addresses.
What is the best way to model this using rails... big thing here is i
want to be able
to reuse a
2006 Jan 31
2
Relationship navigation issue
class Event < ActiveRecord::Base
belongs_to :venue
belongs_to :category
end
class Venue < ActiveRecord::Base
belongs_to :city
end
class City < ActiveRecord::Base
belongs_to :state
end
I want to retrieve all event records belonging to a state. Coming from
hibernate background I tried something like this:
def self.list_for_a_state(state_id)
find_by_sql(["select e.*
2006 May 18
3
populating array of text_fields from an array of model objects
I have in my view the following:
<% 0.upto(@num_performances) do |idx| -%>
<%= text_field ''performance'', ''city'', :index => idx, %>
<%= text_field ''performance'', ''venue'', :index => idx, %>
<% end -%>
and in my controller I have:
@performance = [Performance.new("city" =>
2006 Jul 07
4
need help with some ugly code - is there a better way?
Hi,
In my user_controller.rb, I have the following method, which is supposed
to send the user to their profile, dependng on what "role" they are (the
roles correspond to the other controllers: venue, band, fan):
def login
if request.post?
if session[:user_id] = User.authenticate(params[:user][:login],
params[:user][:password])
flash[:message] =
2008 Sep 04
3
Can you use observe_field to watch a select list and then update the contents of a text field?
Before I waste more time trying to figure that out, I was wondering if
it''s even possible? The Rails Way says that observe_field by default
will trigger changes in text fields and text areas, and on clicks for
radio buttons and check boxes. So perhaps I''m using the wrong tool
here? Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you
2007 Apr 19
0
scRUBYt! 0.2.8
This is long overdue (0.2.8 is out for about a week already), but
anyway, here we go:
============
What''s this?
============
scRUBYt! is a very easy to learn and use, yet powerful Web scraping
framework based on Hpricot and mechanize. It''s purpose is to free you
from the drudgery of web page crawling, looking up HTML tags,
attributes, XPaths, form names and other typical
2006 Apr 06
2
using select() to relate tables
I''m sorry to be asking trivial questions, but I''m new to RoR and am
hooked :), so I''m very impatient to get things up and running.
given two related tables, "pcs" and "venues" (venues have many PC''s and
each PC belongs to one venue only) I can use a select() to present venue
names in the "new PC" form along with other PC details to
2007 Mar 04
2
Installing
I have skimmed through many web pages, how to''s and editorials, my
final conclusion is that the programming language for this particular
part of the program is going to be Ruby.
There are many reasons:
1. Apple will support it in 10.5
2. There seems to be a lot of support for it in the Mac community
3. Ruby developers seem to be Mac people.
4. There is better documentation than
2003 Jul 09
2
CFP: CART Data Mining Conference 2004
Apologies for cross posting....
---------------------------------------------------------------------
CART Data Mining'04: First International CART(R) Conferences
Focusing on the Data Mining technology of
Leo Breiman, Jerome Friedman, Richard Olshen, Charles Stone
(CART, MARS(R), TreeNet(tm), PRIM(tm)...)
First Call For submissions
2006 Jun 08
3
Foreign key confusion
I have 2 models right now: "users" and "posts". When a user creates a
post I would like their id to be recorded under "user_id" in the "posts"
table. Under the "user" model I have:
class User < ActiveRecord::Base
has_many :posts
end
And under the "posts" model I have:
class Post < ActiveRecord::Base
belongs_to :user
2015 Feb 12
4
Thread moderation and list etiquette (Reference - Another Fedora Decision)
On Thu, Feb 12, 2015 at 10:51 AM, Brian Mathis
<brian.mathis+centos at betteradmin.com> wrote:
> CentOS is unquestionably one of the most used Linux distros
> in the world, and yet the mailing list is relatively quiet. To me this is
> a symptom of a problem, and I feel that it's partially a result of the same
> regular people,
I think it is generally a good thing when the
2013 Apr 30
5
CentOS Dojo at Phoenix, AZ on the 10th May 2013
Hi,
The second CentOS user interaction Dojo is taking place at Phoenix, AZ,
USA on the 10th May 2013. And once again, we have a great line up of
speakers covering a broad spectrum of technologies that people running
CentOS usualy care about most. For details on the speakers, the topics
and the venue : http://wiki.centos.org/Events/Dojo/Phoenix2013
The early bird ticket sales end on the 30th
2011 Feb 17
2
[OT] high quality point-to-point audio streaming software?
Hi Guys
Sorry, this is off-topic here but relates to current use of CELT and/or Opus
in real-world systems. If there's a better forum to ask this question please
let me know.
I'm wondering if anyone can point me in the direction of software I can use
right now that will give me high-quality point-to-point live audio streaming
accross the internet. Kind of like Skype, but designed
2009 Oct 14
5
IO controller Mini-Summit 2009
Hello,
I have summarized the topics for the IO controller mini-summit and
written the ideas seen in the mailing list.
- The place where IO controller should be implemented
- Block layer in conjunction with the IO scheduler
- Common layer right above the IO scheduler
- CFQ enhancement.
- Both block and common layer, users can select whichever controller
they want.
- VFS layer
-
2009 Oct 14
5
IO controller Mini-Summit 2009
Hello,
I have summarized the topics for the IO controller mini-summit and
written the ideas seen in the mailing list.
- The place where IO controller should be implemented
- Block layer in conjunction with the IO scheduler
- Common layer right above the IO scheduler
- CFQ enhancement.
- Both block and common layer, users can select whichever controller
they want.
- VFS layer
-