Displaying 8 results from an estimated 8 matches for "collection_id".
2006 Jan 10
1
sql server freetds/odbc question
...ffset!''
/vendor/rails/activerecord/lib/active_record/base.rb:931:in
`add_limit!''
/vendor/rails/activerecord/lib/active_record/base.rb:924:in
`construct_finder_sql''
Any help appreciated!
Jamie
------
class ActionController::Base
def paginate_with_sort(collection_id, options={})
@params[:sort_direction] ||= ''-1''
asc_desc = {''1'' => "asc", ''-1'' => "desc"}
options[:order] = "#{@params[:sort_by]} #{asc_desc[@params
[:sort_direction]]}" if @params[:sort_by]...
2006 Jan 10
1
sql server & linux: left join problem
...`paginator_and_collection_for''
/vendor/rails/actionpack/lib/action_controller/pagination.rb:
124:in `paginate''
/lib/sorting.rb:7:in `paginate_with_sort''
Any ideas appreciated.
Thanks,
Jamie
-------------
class ActionController::Base
def paginate_with_sort(collection_id, options={})
@params[:sort_direction] ||= ''-1''
asc_desc = {''1'' => "asc", ''-1'' => "desc"}
options[:order] = "#{@params[:sort_by]} #{asc_desc[@params
[:sort_direction]]}" if @params[:sort_by]...
2006 May 18
3
Model Madness: habtm vs through
...on"
end
class Collection < ActiveRecord::Base
belongs_to :person
has_many :things, :through => :thing_collections, :order =>
"position"
end
class ThingCollection < ActiveRecord::Base
belongs_to :collections
belongs_to :things
acts_as_list :scope => :collection_id
end
-*-*-*-*-*-*
Yes, I am in over my head.
Yes, I am smart, and willing to learn.
Yes, I want to built something that will last and be flexible...
No, I haven''t even moved on past the model, because I wish to
understand...
Thanks!
sudara
--
Posted via http://www.ruby-forum.com/.
2006 Mar 18
2
redirect killing dispatch.cgi
hi, having a maddening problem with a redirects between controllers.
app is working fine on my two local machines, a mac and a pc, with either
webrick and lighttpd/cgi on either machines.
i move it to my hosting provider and try to get it working with apache + cgi,
most of it works, but it fails at a specific spot, and causes dispatch.cgi to
hang indefinitely. nothing shows up at all in the
2005 Sep 18
5
NameError: uninitialized constant Addres
I created some scaffolding for an Address model and an Addresses controller.
When running the functional tests for the addresses controller, I get
this exception: "NameError: uninitialized constant Addres"
The exception seems to start from this function:
def list
@address_pages, @addresses = paginate :address, :per_page => 10
end
I''m guessing pluralization bug?
2006 Jan 04
2
Updating Attributes in a HABTM Join Table
...fore but it seems like overkill for
something so simple as this. If it knows both unique ids, it should
possible. Is there a way to update a HABTM join attribute with a
method similar to push_with_attributes? Seems like there should be
something like:
Object.collection.update_attributes(collection_id, attribute => value)
Kevin
2006 Jan 02
6
Paginate with joins messing with id
Hi all,
Best wishes for the new year! :'')
I''m very new to Ruby and Rails, and I ran into a problem with the
"paginate" function. When I use the following method to get a number
of forum topics based on a category name passed via the URI:
@topic_pages, @topics = paginate :topics,
:joins => "INNER JOIN categories ON
2006 Apr 09
4
Inheritance via Though Associations?
...t I want.
OK, three core tables:
create_table :reference_items do |t|
t.column :title, :string, :limit => 255
t.column :year, :integer, :limit => 4
t.column :type, :string
t.column :container_id, :integer
t.column :collection_id, :integer
t.column :original_id, :integer
t.column :event_id, :integer
end
create_table :contributors do |t|
t.column :type, :string, :default => "Person"
t.column :sort_name, :string, :limit => 255, :null =>...