similar to: Error When Sorting

Displaying 20 results from an estimated 600 matches similar to: "Error When Sorting"

2006 Jan 21
1
Sortable Element with Partials?
Hi Everyone, I posted this last month and unfortunately, I didn''t recieve any replies. Maybe this time I''ll have better luck. I originally had my sortable element list working properly like so: <ul id="sortable_list"> <% @items.each do |item| %> <li id="item_<%= item.id %>"><%= image_tag "dragme.gif"
2006 Nov 04
1
Dynamically updating a sortable list using RJS
I''ve got the following sortable list in one of my views: <ul id="sortable_list" class="sortable_list"> <%= render(:partial => ''section'', :collection => @sections) %> </ul> <div class="new_section" id="new_section"> <%= form_remote_tag(:url => {:action =>
2006 May 13
1
newbie question - routes.rb on server
Hello, I am new to Ruby but not to programming. I have a domain name and server space with a host who said that ruby on rails should work on the server. All I want to do is make sure that a test ruby application works online so that I can begin development on an app. I am able to get the test program to work locally but not online. In C:/ruby/projects/test/controllers/TestController.rb:
2006 Jan 07
1
Sortable Element with Partials??
Hi Everyone, I originally had my sortable element list working properly like so: <ul id="sortable_list"> <% @items.each do |item| %> <li id="item_<%= item.id %>"><%= image_tag "dragme.gif" %><span id="title_<%= item.id %>" class="title"> <%= item.value %></span> <span
2006 Feb 10
2
Sortable + Draggable : doesn''t follow the mouse horizontally
When a ''draggable'' element is made ''sortable'', it no longer follows the mouse horizontally when you drag it. Is there a solution/workaround? TIA Alain
2006 Jul 22
3
Connection refused - connect(2)
Dear all, Please help me in this regards, I am using models to access LegacySchemas using set_table_name and set_primary_key... [code for model] class CdDetails < ActiveRecord::Base def self.find_data set_table_name ''cd_details'' set_primary_key ''cd_label'' find (:first, :select => "cd_label") end
2007 Jun 10
0
pb when posting to an action "render_text body, :status => 400"
Hi, I''m trying to do a little openid-server in rails. I encounter a very strange problem for me, you can see all the story in the openid mailing-list : http://lists.openidenabled.com/pipermail/dev/2007-May/000666.html http://lists.openidenabled.com/pipermail/dev/2007-June/000700.html In short, the problem is : the server has to do a "render_text body, :status => 400"
2006 Mar 29
0
Bug with skip_before_filter?
There seems to be a bug with skip_before_filter using the :only or :except conditionals. Or am I using them completely wrong? I have this code: The result is that :test_filter is skipped for both index, and index_no_filter. application.rb # Filters added to this controller will be run for all controllers in the application. # Likewise, all the methods added will be available for all
2006 Jul 14
1
no such file found
I''m trying to set up my app on Linux SUSE, apache2 using fastcgi. Now at http://host/ I''m able to see the greeting page (index.html in public). However, if I try to access my app http://host/candidate/index I keep getting in the log: No such file to load -- /usr/home/nye/hire/public/../config/../app/controller/test_controller.rb Did I set my path wrong? What''s
2006 Jul 14
0
no such file to load?
I''m trying to set up my app on Linux SUSE, apache2 using fastcgi. Now at http://host/ I''m able to see the greeting page (index.html in public). However, if I try to access my app http://host/candidate/index I keep getting in the log: No such file to load -- /usr/home/nye/hire/public/../config/../app/controller/test_controller.rb ... Did I set my path wrong?
2006 Jan 17
4
textarea problem with accentued chars
Hello, I have a problem with accentued characters return from a textarea I have 3 simple files to show example ( below ). index.rhml : If I put "?nial" inside the textarea, then submit to :action => post post.rhml : wrote ?nial 195 "\303\251nial" // params[:comment][:message] return => ?nial params[:comment][:message][1] return => 195 ! ( 195 is not
2006 Aug 07
1
Unable to page.replace_html from rjs
I am having problems updating a div defined in a partial using both Element.update and page.replace_html in an rjs. I can put a link_to_remote in the partial using an :update, and the div updates fine. Does anyone have any idea why this might be happening? In the partial: <div><div> . . <div id="question_<%=question.id%>_error"></div> . (if a
2006 May 12
1
each_with_index. Can you start at a desired index position?
When using array.each_with_index how do you start at a desired index position? I can do it like this, but its not very clean and doesnt seem efficient : desired_index_start = 20 array.each_with_index do |value,index| next if index<desired_index_start end Thanks Chris -- Posted via http://www.ruby-forum.com/.
2006 Feb 23
5
sortable_list added to by AJAX question
I have a working sortable_list that is added to by AJAX. The problem is that when a new item is added, it''s not sortable. I found a post on scriptaculous using behaviour.js to refresh the DOM when an item is added, but I can''t figure out how to do it with Rails. To test the behaviour method, I used this: var myrules={ ''div#steps ul'' :
2006 Apr 03
2
Fast way of finding new position for model object?
I have a model object that acts as a list. The position of each object is determined by two factors: number of votes ascending and age of object descending. When a user adds or deletes a vote I need to quickly update the associated model object''s position. Right now this is done with the following method: def update_position position = nil Bug.find(:all, :order =>
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout test_controller def list layout "stdlayout" end in the views/test/layouts stdlayout.rhtml <html> <head><title>test</title></head> </body> <h1>Test</h1> <%= content_for_layout %> </body> </html> 2) I get Rails Application Error when trying to use a separate
2006 Apr 19
2
Ferret EOFError creating index
I''ve been messing around with Ferret (no punn intended). After spending some time testing it out (indexing to file), I decided to index about 10% of the data I want to eventually index. It took several hours to complete the index on my local machine, but it was created without any problems and after optimising it the searches returned results at the sort of speed I was expecting. I
2006 Jan 02
3
Re: Getting Index When Using render :partial (Benjamin Stiglitz)
Thanks for the suggestion, Ben. This seems an excellent approach to the problem, except that I''d been under the impression that one could only call render once. If you call it multiple times as the each_with_index loop iterates, are the results just combined automatically? How does that work? Thanks! Sean ----- Sean McMains AIM: SeanMcTex http://www.mcmains.net/ruminations On
2006 Feb 28
6
Problem with select and each_with_index
Disclaimer: Ruby newbie at work Thought I was going so well. Wanted to produce a select box from an array constant, with the indices returned as values , and the array values used as the descriptions. Checked out Ruby RDoc and saw there was an each_with_index method and came up with: <%= select (''type'', ''typecategory'', Typecategory.each_with_index
2008 Jan 18
1
Values broken converting from rails into javascript
I have a section of javascript which i''m trying to use to dynamically generate the options for a mult-select box, when another box''s contents are changed. Basically i have a method that returns an array of arrays, where each array is of the form [name, number] I then iterate over the arrays, and substitute in the values out of the array -