Displaying 20 results from an estimated 6000 matches similar to: "Inconsistent Invalid Argument Error"
2007 Apr 04
4
Order a find using a has_many association
I''m trying to order a find through a has_many association. I have a
model called SalesOrder. Each sales order has things like amount,
description, etc. I use the following to get the Sales Orders:
@sales_orders = SalesOrder.find(:all)
And I display them with:
<td><%= link_to sales_order.id.to_s, :action => ''show'', :id =>
sales_order.id
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
This patch creates the shell for much of what the cloud ui will
become. It is focused on layout (lightly fedora themed), accessibility,
and 'bookmarkability'. This layout uses no javascript (that will be
used to enhance interactivity in a future patch). It also introduces
the idea of using a simple table rather than the more conplex js/json
we use in the admin side. Plan here is to
2006 Aug 01
3
paginate, search, sort with ajax problem
hello I hope somebody can help me figure this out.
found this great tutorial at http://dev.nozav.org/rails_ajax_table.html.
got it working except for one thing.
I can''t seem to make the pagination work. The link_to_remote defined in
the helper is pointing to the wrong url.
I have set up things like so:
defined a search method in de project_controller located in
apps/admin/project.
2006 Sep 06
3
url_for , controller routing error
I have an ''account_controller.rb'' in an ''admin'' module
I list the accounts with : http://0.0.0.0:3000/admin/accounts/list,
and get my table
trying to sort it, I use the follwoing sort_link_helper :
def sort_link_helper(text, param)
key = param
key += "_reverse" if @params[:sort] == param
options = {
:url =>
2007 Mar 16
1
sort_link_helper and cross-controller partials
Hello Rubyists,
I ran into a problem with sorting a table (rendered in a partial) using
the sort_link_helper methods after I have submitted data and re-rendered
the table through an AJAX request.
The setup is a follows:
The table is a shared partial of Controller1 and Controller2 accessible
via "shared/table". The AJAX''ed sorting using the sort helper works all
fine on
2006 Aug 11
0
SQL sort
in my list action, I setup the sort parameters as folows :
..
sort = case @params[''sort'']
when "login" then "login DESC"
when "first_name" then "first_name DESC"
when "last_name" then "last_name DESC"
end
...
to be used in a ''sort_link_helper''
2009 Jul 06
0
[PATCH server] UI for accumulated uptime for VMs. (revised2)
This revised version of the patch incorporates jguiditta's sorting fix as well as some other changes required to make this work fully on the cloud UI side.
---
src/app/controllers/pool_controller.rb | 2 +-
src/app/controllers/resources_controller.rb | 4 +++-
src/app/controllers/smart_pools_controller.rb | 7 +++----
src/app/helpers/application_helper.rb | 14
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
This revised version of the patch incorporates jguidditta's sorting fix as well as some other changes required to make this work fully on the cloud UI side.
---
src/app/controllers/pool_controller.rb | 2 +-
src/app/controllers/resources_controller.rb | 4 +++-
src/app/controllers/smart_pools_controller.rb | 5 ++---
src/app/helpers/application_helper.rb | 14
2009 Jul 06
2
[PATCH server] UI for accumulated uptime for VMs. (revised3)
This revised version of the patch incorporates jguiditta's sorting fix as well as some other changes required to make this work fully on the cloud UI side.
---
src/app/controllers/pool_controller.rb | 2 +-
src/app/controllers/resources_controller.rb | 4 +++-
src/app/controllers/smart_pools_controller.rb | 7 +++----
src/app/helpers/application_helper.rb | 14
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
There's still a problem with this working on the cloud side, but that can be resolved in a subsequent commit.
---
src/app/controllers/pool_controller.rb | 2 +-
src/app/controllers/resources_controller.rb | 7 ++++++-
src/app/controllers/smart_pools_controller.rb | 5 ++---
src/app/helpers/application_helper.rb | 14 ++++++++++++++
src/app/models/vm.rb
2006 Aug 16
0
sort_link_helper , sorting on date
I am using this helper to sort my table colums, no problem sorting on
string but how can I sort a date colum ( in my DB, )
user_helper.rb ----------------------
def sort_link_helper(text, param)
key = param
key += "_reverse" if @params[:sort] == param
options = {
:url => {:action => ''list'', :params => @params.merge({:sort =>
key, :page =>
2006 May 03
5
Finding the rhyme for has_many :through
Hi all,
I am NOT a person with English as my mother language and I haven''t been
programming long enough to be natural in these kind of things. And if
that isn''t bad enough, I am a newbie on Rails too... So please enligthen.
I am trying to build a simple tool for my shop. I have many products
that I sell in my shop and of course I have many suppliers for the
products. Thus
2006 Aug 18
4
Default Date storage 0000-00-00?
So I have a database of orders more or less.(it is currently in the
process of being upgraded to mysql with a rails fronted, from OLD
Paradox database) On one page I made a ''create new order'' system. This
allows me to put in the due date and other info. However I wanted to put
in the default value of ''0000-00-00'' for the shipped date, as it hasn''t
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if
the user has no access right)
this is my code, it work the first time I run the application, the second
time I refresh the page I always get "stack level too deep error"
module UsersHelper
include ActionView::Helpers::UrlHelper
alias_method :link_to_original, :link_to
def permission?
true
2008 Feb 07
4
text_field_with_auto_complete
I have the following in my view:
<% form_tag :action => ''detail'' do %>
Search for Sales Order Number:<br />
<%= text_field_with_auto_complete :sales_order, :id %>
<%= submit_tag " Go "%>
<% end %>
And I have the following in my controller:
auto_complete_for :sales_order, :id
This worked fine in 1.5, but
2009 Jun 30
0
[PATCH server] permit many-to-many vms / networks relationship
- db, model, service, controller, and view changes
- many tests additions
- various fixes / cleanup to get things working
depends on my last two (still unacked) patches:
- add collapsable sections to vm form
- provide default vm allocated cpu and memory values
ovirt-agent might need to be updated to work with the changes
---
src/app/controllers/pool_controller.rb | 2 +-
2006 Apr 21
13
Sorttable.js
I have come across this neat Javascript table sorter at
http://kryogenix.org/code/browser/sorttable/
It seems straigh forward to use but i cant get it to work.
I have included in the head
<script src="javascripts/sorttable.js" type="text/javascript"></script>
In the View
<table class="sortable" id="anyid">
<thead>
2011 Feb 12
5
link_to a action in the controlles is not called
i have a link where it has to call a method defin in todoscontroller
named say_when but show is called
<td><%= link_to ''Say when'', todo, :action => :say_when ,
:remote => true %></td>
class TodosController < ApplicationController
# GET /todos
# GET /todos.xml
def index
@todos = Todo.all
respond_to do |format|
format.html #
2006 Jun 20
4
Prototype Array bug??
function CreateTOC(){
var $aTOC = document.getElementsByClassName(''tocitem'');
var $temp = '''';
if(isArray($aTOC)){
for($t in $aTOC){
$temp += ''t='' + $t + '', '' + $aTOC[$t].name +
''<BR>'';
}
$(''test1'').innerHTML = $temp;
}
}
When I run this code
2006 Jan 08
2
sorting tables by columns
What I''m trying to do is have clickable column headers that will sort
the table by that column. What I have below works, except there is only
one variable storing the sort direction for all the columns, whereas I
need a separate one for each column name.
list view:
<th><%= link_to ''Category'', :action => ''list'', :order =>