Displaying 20 results from an estimated 600 matches similar to: "NewbieQ - Relational tables"
2006 Aug 11
5
Unit tests - NilClass problem
Hi!
Yesterday I started to write my unit tests for the fist time using
rails. I''m using this method:
http://blog.codahale.com/2005/12/23/a-rails-howto-simplify-your-unit-tests/
My customer_test.rb looks like this:
require File.dirname(__FILE__) + ''/../test_helper''
class CustomerTest < Test::Unit::TestCase
fixtures :customers
# Replace this with your real
2005 Dec 23
2
NewbieQ: How do you specify a name for a form
In start_form_tag howw do you specify the form name??
Eric
2005 Dec 30
1
NewbieQ concatenating name in options_from_collection_for_select
Hi,
A real dumb one :~/
How do you concatenate a first_name, last_name as the text method for
OFCFS? Damned if I can do it without error. Is it in the original select
for the collection?
Eric.
2003 Jun 10
2
NewbieQ: SOHO setup with x100p
After scouring the list archive and not finding the answer I decided to
post to the list. I'm sure the answer is glaringly obvious but please
bear with me.
Using Asterisk, I'm tasked with setting up a SOHO with 5 analogue (FXS?)
lines and a number of soft-phones for internal extensions. I'm confused
by the telephony hardware needed for this exercise -
1) I need the equivalent of two
2006 Jan 06
6
NewbieQ: How do I refresh view after return from popup window
Hi,
I have this bitta code that is supposed to open a new window and allow
the user to create a new Organisation on the fly whilst editing a new
Person i.e. if the Organisation exists they can select it from the drop
down select. Otherwise they can click on the cute button and enter a
skeleton Organisation record. What I need to do next is refresh the drop
down select on returno the new
2005 Dec 22
3
NewbieQ : undefined method `stringify_keys!'' Dumb Question
Hi,
I''m running round in circles again! I''m trying to save a note that has a
HABTM relationship with a job. The note is new - the job exists.
In my partial for notes I have ;
<%= start_form_tag :action => ''new_note'', :id => @job %>
<%= text_area_tag "note", nil, :size => "65x10" %>
<%=submit_tag
2009 Feb 02
2
ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))
i keep getting this AssociationTypeMismatch error. i think this could
be a bug related to ruby/rails when using mixins. heres a short
version of my code:
# user.rb
require ''friend_invitation''
require ''friendship''
class User < ActiveRecord::Base
include FriendInvitationUser, FriendshipUser
...
end
# friendship.rb
...
module FriendshipUser
def
2007 Aug 14
2
AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
Before I chalk this up as a bug and report it, I just want to make sure I''m not
doing something silly.
Running ZenTest''s autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the
following failed test:
ActiveRecord::AssociationTypeMismatch in ''User should create an avatar with
uploaded_data''
Avatar expected, got Avatar
This only happens with that exact
2011 Aug 09
2
Devise AssociationTypeMismatch
My site is using Devise and Cancan. Currently I have 3 roles setup
I am testing creating a new user using the following command (role is
required):
curl -H "Content-Type:application/json" -H "Accept:application/json" -
d "{\"user\":{\"email\":\"test01-J0of1frlU80@public.gmane.org\", \"role\":\"2\", \"name\":
2012 Jun 09
7
ActiveRecord::AssociationTypeMismatch in UsersController#update
Hi
Im trying to link my User model to a Teams model. I seem to be getting
the following errors. Any help would be great as Im just new to RoR
Thanks
error
ActiveRecord::AssociationTypeMismatch in UsersController#update
Team(#2183395560) expected, got String(#2174675960)
app/controllers/users_controller.rb:67:in `update''
app/controllers/users_controller.rb:66:in `update''
2011 Nov 24
5
ActiveRecord::AssociationTypeMismatch
Hi to all,
I have this error and I don''t understand why. I have three model,
Image and Playlist and PlaylistItem. Everything works fine. The app
should work also a XML REST service. When I made this call I obtain
this XML because the playlist don''t contains images:
GET http://0.0.0.0:3000/playlists/7.xml
<playlist>
<id>7</id>
2006 May 09
2
Problem creating new record
Hi
I have two tables
1. devices
2. device_categories
both associated with each other via foreign key device_category_id in
device table. I use scaffold and create a base system. I associate the
two models together via belongs_to declaration in device model, and
has_many declaration in device_categories model. I also add a device
category drop-down box on create page to select
2005 Apr 04
1
Validation problems: ActiveRecord::AssociationTypeMismatch
Hi everyone, I''m starting on my first rails project and I have a
problem that I''m sure has a simple solution. I have two models, an
address model and a state model. The address belongs_to :state,
foreign_key=>"state" and validate_associated :state
I have new & edit controllers for address which contain a drop down
list for the state choice. My list was
2009 Jan 15
4
HABTM and Check Boxes (Yet Another thread on this)....
Hi there,
it''s an afternoon that i''m destroying my head on this, and i''ve decided
to ask to you all .
I''ve got to do some check box lists for a modified substruct version i''m
doing, right now, i''m interested to insert a list of categories of
interests into a customer sheet
i''m using the substruct plugin version, wich stays in the
2005 Dec 31
3
Sort or Order a <Select> box.
Evening folks,
I''m new to RoR, and have found some very useful info on this site,
thanks.
I have a select box that I need to sort.
<select name="people[peoplekind_id]">
<% @peoplekinds.each do |peoplekind| %>
<option value="<%= peoplekind.id %>"
<%= '' selected'' if peoplekind.id == @people.peoplekind_id %>>
<%=
2007 Dec 04
10
ActiveRecord::AssociationTypeMismatch
I have the requirement to empty the association records and add the
association records as new (as below).
@task = Task.find(params[:task_id])
@task.task_users = []
params[:ids].split(", ").each do |court_user_id|
task_user = TaskUser.new(:court_user_id => court_user_id)
@task.task_users << task_user
end
@task.save
This is not working. Following error is thrown.
2014 Dec 11
2
Migrate with Dsync
Hello List,
i have a simple and maybe stupid question but,
read the guide on http://wiki2.dovecot.org/Migration/Dsync now i wonder
where to put this configuration ? May i oversee something but i would
appreciate any hint toward solving my problem.
regards,
dominik
2013 Aug 06
2
Samba4 using existing DNS and LDAP
Hi,
I have been using Samba3 (and 2) for years, with an openLDAP backend for
authentication. This is working fine, my directory includes a number of
local settings for my specific needs.
Now I would like to move to Samba4.
I understand that Samba4 comes with its own DNS and LDAP servers.
By provisioning Samba4 with --dns-backend=NONE and including the
necessary to my existing DNS zone, is
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
Hi,
I have been trying to do this for a few days now and cannot figure it out. I
would be very grateful is anyone can help me
I am trying to upload an attachment to AWS, S3 using paperclip,
however every time I keep getting this error:
ActiveRecord::AssociationTypeMismatch in ProjectController#create_notice
Graphic(#37649720) expected, got Tempfile(#27280470)
RAILS_ROOT:
2007 Feb 08
5
a possible bug in Has_many :through using :soucre
I''ve been stumped on this for a few days and I''m not sure if it''s an error
on my end or an actual bug.
I have a system where I have workshops and users. Workshops have students,
presenters, and troubleshooters. I wanted to represent this simply by
using has_many :through with :source.
Workshop
has_many :presenters, :through =>:presenterships, :source=>:user