Displaying 20 results from an estimated 23 matches for "list_id".
2006 May 13
4
somewhat advanced question about mysql
so here is the deal. i''ve got three tables: lists, items, comments, and this is how they are laid out:
lists table
id
title
items table
id
list_id
item
comments table
id
list_id
comment
to give you some background. in order to get a list of all the lists i am making this call:
SELECT lists.id, title, count(items.list_id) AS total_list_items
FROM lists
INNER JOIN items ON list_id = lists.id
GROUP BY list_id
O...
2006 Jul 02
6
remote form w/ evalScripts:true
...he template that I WANT to use to
POST to this action:
<%= form_remote_tag :html => { :action => url_for(:controller =>
"list_item_links", :action => "create") }, :eval_scripts => true %>
<%= hidden_field ''list_item_link'', ''list_id'', :value => @list.id%>
<%= hidden_field ''list_item_link'', ''list_item_type'', :value => ''List'' %>
Which list?
<%= select ''list_item_link'', ''list_item_id'', @lists.collect{ |l|
[ l.nam...
2012 Aug 08
1
Creating ToDo List App
...rated scaffolds
list title:string & task description:text listname:string
Next, in order to link the listname for Tasks and the list titles in the
Lists I generated a migration file which looks like this
class AddListIdToTasks < ActiveRecord::Migration
def change
add_column :tasks, :list_id, :integer
end
end
I then added active record association has_many :tasks and for the Task
I used belongs_to :list (, :foreign_key => "list_id)" - even though I
think this last part was unnecessary).
Finally I ran rake db:migrate.
Now I have the table setup (checked it in SQLite Da...
2006 Sep 28
15
Inserting rows into linking table
...to select the
contacts using checkboxes, but I''m having some problems with the
controller and model.
I receive the following error message when I submit the form:
Mysql::Error: Cannot add or update a child row: a foreign key constraint
fails: INSERT INTO contact_lists (`contact_id`, `list_id`) VALUES(1, 2)
However, the form variables returned from the form are:
Parameters: {"commit"=>"Add Contacts to List",
"contact_list"=>{"contact_id"=>["4", "5"], "list_id"=>"2"}}
I''m not sure if...
2006 Sep 10
5
why isn't :order working in acts_as_list
...s to order by the specified column.
class List < ActiveRecord::Base
has_many :list_items, :order => "orderby"
The error I get back when trying to save the link is:
Unknown column ''position'' in ''order clause'': SELECT * FROM list_items
WHERE (list_id = 9) ORDER BY position DESC LIMIT 1
So it looks like its just defaulting to ''position'', and isn''t getting my
value of orderby. Is there something obvious i''m missing here? This is
getting annoying...
Any help or thoughts would be great. Thanks!
Jack
--...
2007 Jan 05
2
Using RESTful routes in controller tests
Why can''t I use the RESTful route helpers in my specs?
In my controller I''m doing a redirect: redirect_to list_path(:id =>
@item.list_id)
Now when I write: controller.should_redirect_to list_path(:id => 2)
I''m getting the following error:
NoMethodError in ''POST on /lists/2/items should redirect to index on
succesful POST''
You have a nil object when you didn''t expect it!
The error occurred whil...
2006 Jul 08
9
How to handle dynamically columned tables in rails
I want to build an application that lets me (the end user accessing a
web page) design a simple list with columns and add records. E.g., if
the end user says I want a table that has a list of songs, he can create
a list (title, date, artist, label) and then make another list of, e.g.,
books on his bookshelf with the necessary columns (title, author,
pub_date, shelf).
The end user
2006 Jan 29
16
counting rows via associations
Hi:
I have a table called clients and each client has many lists (a
has_many and belongs_to has been created in the class.
What I need to do is get a count of the rows in each list for each
client. I was hoping I could do something like
client.lists.count but it does not seem to work. Any suggestions?
bruce
2007 Mar 23
2
has many ( THROUGH ) confusion
...any listshares
-- has many lists ( through listshares )
- list
-- has many listshares
-- has many accounts ( through listshares )
- listshare
--belongs to account
--belongs to list
I would have expected that if I perform the action list.destroy, then
any records in listshares with the associated list_id would be deleted
too.. but they are not.
If they should be, my model is wrong somewhere. If not, I can stop
pondering, and code the listshares tidyup manually.
Thanks
Keith
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google...
2006 Jul 02
10
Use Rails or PHP?
I''m new to RoR and have used PHP. I want to develop a personal
organizer that allows me to add lists (tables) and search them. The
ActiveRecord concept seems to allow me to set up something that works
with an existing table, but I want the ability to add tables without
programming. I know how to do this in PHP and I can put the SQL into
queries in RoR, but does ActiveRecord let
2017 Jan 16
3
[cfe-dev] Your help needed: List of LLVM Open Projects 2017
The list can't ommit clang-tidy.
There are many ideas about new checks on llvm bugzilla.
https://llvm.org/bugs/buglist.cgi?product=clang-tools-extra&component=clang-tidy&resolution=---&list_id=110936
Everything matching ".*Feature Request.*"
Piotr
2017-01-16 21:31 GMT+01:00 Sean Silva via cfe-dev <cfe-dev at lists.llvm.org>:
> Do we have any open projects on LLD?
>
> I know we usually try to avoid any big "projects" and mainly add/fix
> things in...
2008 Jan 30
0
Besoin d'un Financement rapide ?
...en
vitesse moyenne. Dur?e : 39 mois (avec report) dont une derni?re mensualit?
ajust?e de 130,84?. TAEG r?visable de 18,93 %. Co?t du cr?dit 1 380,84?.
Hors assurances facultatives.
Pour vous d??sinscrire :
[12]http://www.charlymail.comcharlynews/subscription.php?list_id=6&op=leave&
email_addr=r-help%40stat.math.ethz.ch
References
1. http://clic.reussissonsensemble.fr/click.asp?ref=365414&site=4428&type=text&tnb=42
2. http://clic.reussissonsensemble.fr/click.asp?site=4428&ref=365414&type=text&tnb=77&subid=&diurl=ht...
2006 Jan 21
5
Help...why ''rake migrate'' can''t be executed on RadRails
...me advice,please
Tanks
-~kota~
===================================
class InitialSchema < ActiveRecord::Migration
def self.up
create_table :lists do |t|
t.column :title, :string
t.column :created__on, :time
t.column :updated_on, :time
end
create_table :items do |t|
t.column :list_id, :integer
t.column :note, :string
t.column :completion, :boolean, :default => false
t.column :position, :integer
t.column :created_on, :time
t.column :updated_on, :time
end
end
def self.down
drop_table :lists
drop_table :items
end
end
========...
2016 Aug 30
2
Remaining spam in Bugzilla
Hi!
There were several new spam entries in Bugizlla, created from
previously created accounts.
I think will be good idea to delete them as well as block spammers accounts :
Report IDs: 30192, 30191, 30187, 30186, 30185, 30182, 28766, 28717,
28715, 28714.
Eugene.
2005 Oct 27
0
has_one with Single Table Inheritance - NameError : uninitialized constant
....
class User < ActiveRecord::Base
has_one :wishlist
end
class List < ActiveRecord::Base
belongs_to :user
end
class Wishlist < List
has_and_belongs_to_many :items, :class_name => ''Album'', :join_table =>
''items_lists'', :foreign_key => ''list_id'', :association_foreign_key =>
''item_id''
end
Whenever I try to access user.wishlist I get the follow exception :
g:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.1/lib/active_support/dependencies.rb:198:in
`const_missing''
g:/ruby/lib/ruby/gems/1.8/gems/activ...
2007 Jan 27
0
Problems with implementation of dynamically updating scores
...find_favolist(session[:user_id])
@li=LineItem.findaddeditem(@p.id,@list.id)
fair=-IARJQAGddPM@public.gmane.org?
puts fair
if fair
puts ''success''
@p.popular_score +=1
@p.save
puts "add"
@li = LineItem.new
@li.product_id =params[:id]
@li.list_id =-7ETwYBW1OEA@public.gmane.org
@li.likeornot =1
@li.created_at = Time.now
puts "line"
@li.save
redirect_to_index("推文成功") --> never worked, why?
else
redirect_to_index("一人只有一票唷") --> never worked, why?
end
end
-----------...
2010 Sep 29
2
Railroad problem with :through?
...list_subscribers
has_many :list_subscribers
end
class Subscriber < ActiveRecord::Base
has_many :lists
has_many :lists, :through => :list_subscribers
end
class ListSubscriber< ActiveRecord::Base
belongs_to :list
belongs_to :subscriber
validates_uniqueness_of :subscriber_id, :scope => :list_id
end
and get the following error:
railroad -i -l -a -m -M | dot -Tpng | sed
''s/font-size:14.00/font-size:12.00/g'' > doc/models.png
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/whiny_nil.rb:52:in
`method_missing'': undefined method `klass''...
2017 Jun 25
2
IMPORTANT: LLVM.org server move complete (SVN impact please read)
...cpp: // https://llvm.org/bugs/show_bug.cgi?id=31702.
> Support/RandomNumberGenerator.cpp:// http://llvm.org/bugs/show_bug.cgi?id=19665
> Target/AVR/README.md:* [Unresolved
> bugs](https://llvm.org/bugs/buglist.cgi?product=libraries&component=Backend%3A%20AVR&resolution=---&list_id=109466)
> Transforms/Utils/SimplifyCFG.cpp: // the line - see
> https://llvm.org/bugs/show_bug.cgi?id=30244.
> Transforms/Utils/SimplifyCFG.cpp: //
> https://llvm.org/bugs/show_bug.cgi?id=30188
> Transforms/IPO/LowerTypeTests.cpp: // Disabled on win32 due to
> https://llvm.org/...
2014 Jun 09
2
Subject tag is gone
I've actually been thinking about it almost since the beginning. It's just been annoying waste of space on my screen. And more importantly nowadays it's also breaking DKIM/DMARC signatures. So if somebody still uses Subject-based filtering it's about time to switch to List-ID header based filtering now.
Another thing I'm wondering about is if I should allow text/html parts,
2017 Jun 24
9
IMPORTANT: LLVM.org server move complete (SVN impact please read)
LLVMers,
We have completed the move to the new server for LLVM.org. One casualty of this move was that svn.llvm.org was NOT enabled at this time.
There is a new certificate for LLVM.org and HTTPS is enabled for the website. We know of a few issues with some of the webpages but will be working them out over the next few days.
Please do not hesitate to contact llvm-admin at lists.llvm.org with