search for: profile_id

Displaying 7 results from an estimated 7 matches for "profile_id".

2008 Sep 16
3
has_one :through eager-loading problem
...has_one :user, :through => :membership has_one :customer, :through => :membership end now if I search for profiles with the :include option: def index @profiles = User.find(:all, :include => [:user, :customer]) end i get an error: Mysql::Error: #42S22Unknown column ''users.profile_id'' in ''on clause'' obviously, it searches for the profile_id on the wrong place, it should search it in memberships anyone has an idea? Thanks.. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups...
2010 Aug 16
8
Executing js.erb file with :format =>'js'
Hi, I''m trying to get my javascript to execute after clicking a link on my page using :format => "js" here''s my link: <%= link_to image_tag("/images/icons/user_add.png"), add_contact_path(:profile_id => profile.id, :url => request.url, :format => "js"), :title => "Add person to your contacts"%> in my controller i have format.js here''s my add_contact.js.erb: $("#contact_icon_<%=params[:profile_id]%>").html("Contact Added")...
2006 Jan 19
3
Migrating from Mysql to PostgreSQL
...; 20 t.column "adjusted_close", :float, :limit => 10, :default => 0.0 t.column "rate_of_return", :float, :limit => 10, :default => 0.0 t.column "ticker", :string, :limit => 10, :default => "", :null => false t.column "profile_id", :integer, :limit => 6, :default => 0, :null => false end The first table lived in PostgreSQL immediately, but the second one failed to rebuild. The error message is: rake aborted! RuntimeError: ERROR C42601 Msyntax error at or near "(" P157 Fscan.l L761...
2008 Mar 31
1
database design help
Hi, I''m coding a little application to make couples profile. The problem is I just don''t know how to create my databases so that their are no bottlenecks and that I can have a relation. The way I see it is that their would be a user database and a profile database and they would link 2 to 1. Is this the right way? In the user db I would store their userid and some session info,
2006 Feb 14
0
Help with Eager Association
...ngs_to :widgets widgets.rb - has_many :widget_configurations So in otherwords, widget_configuration is a sort of ''rich'' m-to-m association table containing foreign keys to both profiles and widgets. The table looks like this: widget_configurations ------------------------------ profile_id (FK) widget_id (FK) -------------------------- So now what I''m trying to do is this: (assuming @profile is an instance variable w/ a profile) @profile.widget_configurations.find :all, :include => [:widget] I end up getting this error: You have a nil object when you didn''t exp...
2006 May 11
1
RoR completely ignoring a column when saving changes
...''is required'', :on => :save, :on => :create validates_associated :profile, :on => :save, :one => :create # Associations belongs_to :profile, :foreign_key => ''profile_id'', :dependent => true has_many :articles # Attributes attr_accessor :password attr_accessible :login_name, :password .... etc .... [/CODE] -- Posted via http://www.ruby-forum.com/.
2008 Dec 09
4
HABTM checkboxes insert but don't delete
I have a problem related with the HABTM relationships with checkboxes. I''ve got a profile and a service model, both related with has_and_belongs_to_many. The problem is that i can insert new data in the profiles_services table, however, i cant delete already existing data. What could be the problem? --~--~---------~--~----~------------~-------~--~----~ You received this message