similar to: acts_as_list, move_higher, odd indexing behaviour?

Displaying 20 results from an estimated 90 matches similar to: "acts_as_list, move_higher, odd indexing behaviour?"

2006 Aug 17
2
RJS - slower than normal RHTML?
I know that isn''t supposed to be the case, and it usually isn''t, but today, I''ve run across a situation where rendering the same partial through RJS is taking about 5 times longer than rendering the partial in the RHTML. I have in my main RHTML <tbody id="account_transactions"> <%= render :partial =>
2006 Mar 22
10
Need for multiple acts_as_list
I have a model "Childmodel" that belongs_to two other models "Parent1" and "Parent2". "Parent1" "has_many :childmodels, :order => :positionp1" and "Parent2" "has_many :childmodels, :order => :positionp2". i.e. The child is independently positioned within each of its parents. This works fine and gets me the useful
2006 Jul 23
2
REST controller with up and down for model that acts_as_list
Hi, I have the following models class Department < ActiveRecord::Base has_many :products end class Product < ActiveRecord::Base belongs_to :department acts_as_list :scope => :department_id'' end When I look at a list of products for a particular department I have up and down buttons to re-order the products. Currently my controller is something like this class
2006 Apr 01
3
acts_as_list with scope : position update problem?
Hello, I''ve tried to set up a class with acts_as_list with a scope argument that restricts a list to records with the same foreign key. For example : database : CREATE TABLE `families` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '''', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; INSERT INTO
2006 Jul 11
0
using acts_as_list storing the information in a session
Hi, I have an order model that i am storing in a session, that is not currently in the database. I am updating the page using ajax, and I do not want to store the order in the database untill it is completely filled out. I have order_items that I am adding to the order, and I have used the acts_as_list within the order_item model. My problem comes when i try and rearrange the order_items
2007 Mar 01
9
Active Record proposal/discussion for improvement
Hello, I have started in "Ruby on Rails: Talk" a discussion about my problems with current ActiveRecord implementation. Please take a look here: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d40b754fc5872a99/47cff815df123b8a?lnk=gst&rnum=2 Regards Oliver Paulus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2007 Apr 30
2
has_many :through polymorphic
Hi All, I have the following arrangement: class PickAndPackRequest < ActiveRecord::Base has_many :transactions, :as => :request has_many :postings, :through => :transactions end class Transaction < ActiveRecord::Base belongs_to :request, :polymorphic => true has_many :postings end class Posting < ActiveRecord::Base belongs_to :transaction end But when I ask for
2013 Nov 08
2
Export CSV
Hi friends, i am using csv export on my application. in my view file code is <%- headers = ["Transaction ID", "Activity ID", "Product Name","Customer Name", "Ticket code"] -%> <%= CSV.generate_line(headers).strip %> <%if !@trans.nil? && @trans.length > 0 %> <% @trans.each do |tran|%> <% if
2005 Jan 14
0
Strange CRCX
Sirs, I have the following situration: 1) AudioCodes Stretto 2000 media gateway running MGCP 2) E1 Digium card at a PC with Asterisk 3) My application running as Call Agent (CA) from Stretto 2000 | My app |----------| Stretto 2000 |----------| E1 card + Asterisk | As my application is the CA of Stretto 2000, everything it sends (RSIPs, acks, etc.) my app answers. And everything I send,
2008 Mar 17
0
arules - getting transaction data in
Hi All Hoping someone can help me with the "transactions" object. I am struggling to get my data in. I know the answer is in the help somewhere I'm sure, I just cannot find it. Essentially, I have data in this format (though I can change it if it particularly unsuitable) Transaction_id, store , salesman, date_time , items 1 , waterfront, john ,
2007 Jul 12
1
acts as list -- adding or moving new item to new location
right now i''m adding an item to my ''list'' but i''m unsure how to move it to a certain spot in the list. specifically i want to put it at the bottom of the list. i assumed that if i did something like parent.children << new_child then the ''position'' field in the child table would be given some sensible default by rails but instead
2006 Feb 28
0
Help: Script isn''t sending any email
Hi, I followed the directions to a ''T'' from the following website: http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer However, the script is dying because it says that the <%= first_name %> value in my notifier view is nil. here is my code: Controller code (abridged): def signup userid = @session[:user].id @user = User.find(userid) @bill =
2010 Dec 23
6
Difference between rake test:units and individually running ruby -I test test/unit/something_test.rb ?
Here''s my issue: running ruby -I test test/unit/something_test.rb for each of my unit tests works perfectly. However, running rake test:units brings errors in all of them - some object becomes nil for some reason. Why might this be happening? Specifics: the object that is successfully not nil when I run the unit tests one-by-one but becomes nil when I do rake test:units is defined like
2010 Dec 10
3
[PATCH 1/7] staging: hv: Convert camel cased variables in netvsc.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/netvsc.c | 852 ++++++++++++++++++++++--------------------- 1 files changed, 445 insertions(+), 407 deletions(-) diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c index 8022781..1c1ee57 100644 --- a/drivers/staging/hv/netvsc.c
2010 Dec 10
3
[PATCH 1/7] staging: hv: Convert camel cased variables in netvsc.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/netvsc.c | 852 ++++++++++++++++++++++--------------------- 1 files changed, 445 insertions(+), 407 deletions(-) diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c index 8022781..1c1ee57 100644 --- a/drivers/staging/hv/netvsc.c
2006 Apr 30
4
acts_as_ordered_tree
I need an ordered (sortable tree) and I just was thinking if somehting like this is possible: class Item< ActiveRecord::Base acts_as_tree :order => "position" acts_as_list :scope => ''parent_id = #{self.id}'' end For my understanding mixing of two acts_as should be p?ssible, at least in this case, right? Unfortunatly the :scope is not working, I am not
2011 Feb 26
1
[PATCH 2/6] Staging: hv: Rename vm_device to hyperv_device
Rename the vm_device abstraction as hyperv_device. Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/blkvsc.c | 4 +- drivers/staging/hv/blkvsc_drv.c | 8 ++-- drivers/staging/hv/channel_mgmt.h | 2 +-
2011 Feb 26
1
[PATCH 2/6] Staging: hv: Rename vm_device to hyperv_device
Rename the vm_device abstraction as hyperv_device. Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/blkvsc.c | 4 +- drivers/staging/hv/blkvsc_drv.c | 8 ++-- drivers/staging/hv/channel_mgmt.h | 2 +-
2005 Apr 12
2
Transactions, audit trails, and logging (fairly long)
I''m building a system where every change made to the database has to auditable. Every time a change is made I store a timestamp, a user id, and description of the transaction in a db_transactions table. Every other table has a transaction_id field that references what transaction last created or updated it. How I handle updates now is have a DbTransactions model that contains
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
Hi all, I''m running into a very strange but incredibly annoying problem that I just can''t seem to solve. The exception is occurring from a seemingly innocuous line in my code, a simple ''logger.warn("some debug information")''. The backtrace follows: SecurityError (Insecure: can''t modify array)