similar to: testing table associations

Displaying 20 results from an estimated 3000 matches similar to: "testing table associations"

2006 Jun 22
2
id column for join table... kosher?
I''ve got two tables, bookmarks & tags. Using a has_and_belongs_to_many association, I can do lookups using a join table called bookmarks_tags. Two questions: 1. Can I have a migration for my join tables? Rails seems to "know" about join tables implicitly from the associations, but if I do a rake migrate the join tables won''t be built. I''ve been
2006 Jan 23
2
del.icio.us-like output
I''m trying to build a page similar to a delicious page that is a listing of your bookmarks in this format: 1. Querying serialized data in ActiveRecord<http://www.karmiccoding.com/articles/2005/11/29/querying-serialized-data-in-activerecord> Hack to search serialized fields to rails <http://del.icio.us/djsodom/rails> ... and 4 other
2006 Jul 08
1
conditional table association?
I''m using a db to log two types of events, link events and tag events. At first I had two tables, link_events & tag_events, but this seemed not very DRY because the only column that was different between them was link_id and tag_id respectively. So I made these tables: events: id int user_id int objtype_id int (holds ''1'' or ''2'' depending
2006 Jan 15
1
Attributes of a relationship
Hi all, I have two types of models which I''m not sure how to model (or if it''s even feasible) with ActiveRecord. Let me know if you''ve got any good ideas. 1) For those of you who are familliar with del.icio.us, you probably know that you can bookmark a site, and add your own tags to it. Each person has their own tags for a site, even though multiple people can
2011 May 19
1
update_attributes updates data from second instance of nested form but not the first
Got a weird situation with an update put to a controller with a form with nested attributes. On the data below, I am updating data for both items (''0'' and ''1'') in rosters_attributes (in the example below I am updating the ''name'' attribute to a new value in both cases. What I am stuck on is that ''1'' gets its data updated,
2006 Jun 28
2
hash value won''t increment with =+ operator
I have a database of bookmarks and tags, and want to count the number of bookmarks each tag is assigned to, for example: user "tyler" has the tag "concerts" on 15 out of his 30 bookmarks. This code: hash = Hash.new("0"); @user.tags.each do |t| @user.bookmarks.each do |b| x = 0 if b.tags.include?(t) then hash[b.id] =+ 1 puts "hash is #{hash}
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
2017 Nov 20
0
elo v1.0.0: Elo Ratings
Dear useRs, I'm pleased to announce the v1.0.0 major release of the "elo" package on CRAN (https://cran.r-project.org/package=elo). This package implements a flexible framework for calculating Elo ratings of any two-team-per-matchup system (chess, sports leagues, 'Go', etc.). It is capable of evaluating a variety of matchups, Elo rating updates, and win probabilities, all
2017 Nov 20
0
elo v1.0.0: Elo Ratings
Dear useRs, I'm pleased to announce the v1.0.0 major release of the "elo" package on CRAN (https://cran.r-project.org/package=elo). This package implements a flexible framework for calculating Elo ratings of any two-team-per-matchup system (chess, sports leagues, 'Go', etc.). It is capable of evaluating a variety of matchups, Elo rating updates, and win probabilities, all
2010 Oct 11
5
Object lost in memory/trashed?
Hi, I''ve got a problem on which I''ve spent many hours, and I can''t get a clue on what is happening... I hope someone here will be able to help me. Here is the situation : my Rails app uses acts_as_commentable and acts_as_bookmarkable on a Diagram model. Everything''s working OK individually: I can create a comment on a Diagram, bookmark it, and so on. Now,
2006 Jun 21
3
rake migrate says table already exists
Hi all, I used the generate script to make a bunch of table migrations, resulting in files like 002_bookmarks.rb, 003_tags.rb, etc. When I did the ''rake migrate'', the db was set up but more migration files appeared, now called 009_create_bookmarks.rb, 010_create_tags.rb, etc. Now when I want to change the database (add a table or column, alter the schema) I do
2005 Dec 17
3
Question on Db Table design
Hi Suppose one has a db to track bookmarks for multiple users. Let''s assume that there are ten''s of thousands of users, and that an average user may have 100 bookmarks. (Assume here that no two bookmarks are the same.) Is it a common practice to have a bookmark table for ALL users, thereby producing a table that has on order one million rows. Or, is it better to somehow group
2005 Sep 01
0
Multi-Page Websites VS AJAX
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 I found this to be quite interesting not sure if there are any plans for implementing it. The problem In a regular Multi Page Interface (MPI) website, each page has a unique URL. These URLs can be used to bookmark your location, and the browsing history is just a list of those URLs in the order you visit them. An AJAX application however has a
2004 Nov 12
1
Firefox keyword searches for R & S-Plus
If you've 'rediscovered the web' with Firefox (http://getfirefox.com), you might find this tip handy. Suppose you want to search the (local) R documentation for information about the lme function. Wouldn't it be nice to just type into the browser address bar: r lme and have the search performed? Here's how (on Windows): Click on this link:
2003 Dec 18
1
sharing bookmarks with rsync
I would like to have my computer at home and my computer at work to share the same bookmarks. My idea was to have each of the computers sync with a server's bookmark file. If the client has a newer file than the server it would upload it, if the client has an older file it would download it. I already have the authentication keys set up and want to do it over ssh. Would this be one way to
2006 Jun 24
2
error log for views?
This may be a bonehead question, but when I have some error in a view I''m testing, the server spits out a generic page: "Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html" This is pretty unhelpful when I''m debugging. Is there an error log for Rails overall
2008 Jun 13
1
Polymorphic :through associations
Could someone please help me with this association scheme? I am familiar with habtm as well as the :through association but this one has me stumped. Here is an example DB. Tags Table: ------------------------- id name Taggables Table: -------------------------- id tag_id taggble_type taggable_id For purposes of this example say that there are 2 other tables that can be tagged and their model
2001 May 15
1
How to display bookmarks on Lotus Notes 5 - Here is the solution
If you use Notes 5 with wine, you probably have the problem, that the bookmarks frame doesn't open when you click on Favourites or other folders on the left side. Solution: Create a Memo in Notes Go to the Body field and select Create/Hotspot/Button In the lower half, select Script and paste in this code Sub Click(Source As Button) Dim db As New
2006 Jun 10
6
table associations
First, thanks to everyone who replied to my pluralization question from before! Today I was trying to do what I think is called a "chained accessor". I have an "events" table and each event has one user. Instead of seeing the id number for each event''s user, I''d rather display the names of users instead. I tried to do this: class Event <
1997 Jul 25
0
What page was it ?
If you ever picked up a book and forgot which page or paragraph you stopped at - you need a ParaMark BookMark. Used by students, avid readers, and teachers everywhere, the nationally acclaimed ParaMark BookMark is the worlds first "smart" book mark. Visit our website today to learn about "smart" ParaMark BookMarks. Find "Smart" BookMarks: