Displaying 20 results from an estimated 30000 matches similar to: "How to List Records in Descending Order?"
2006 Nov 17
8
Basic search, quick question
Hi, I know there are other threads about this topic, but I''ve checked
and none seem to help my problem.
I''m trying to get a simple search to work on my Rails app, but I get a
"Couldn''t find Recipe without an ID" error when I search. Here''s what I
have:
list.rhtml
<%= start_form_tag :action => ''find_recipes'' %>
2007 Mar 18
8
no route found to match "/cookbook/recipe/list" with {:method=>:get}
Hi,
I ve just spent about three hours trying to figure this out, so any
help would be appreciated.
I ve followed these steps:
1. Downloaded Instant Rails
2. Unzipped it
3. Ran "InstantRails.exe" to configure it. (path is c:\InstantRails)
4. Went to the "Manage Rails Applications" area and chose "cookbook"
app.
5. Clicked on "Start with Mongrel"
6. Mongrel
2006 Mar 23
6
easy scaffold question(s)
I''m doing very well with the Hibbs Rolling on Rails tutorial. I have an
easy question for my personal notes. I''m coming up with a simple framework
of steps for creating a basic database. It includes the following maxims to
make original app creation easy:
app_name = MySQL database name
SQL_tablename = model_name
model_name = controller-name
Is this going to work for getting
2008 Jul 27
2
Rails Cookbook review
Guys:
Stuck at the mall today, and just had to crack Rails Cookbook, by O''Reily. It
had a recipe for accepting dynamically created forms. The sample output looked
like this (reconstructed):
p params[:my_form]
> ["1-1" => 0, "1-2" => 0, "1-3" => 0, "2-1" => 0, "2-2" => 0,
"2-3" => 0,
2000 Dec 14
1
Sort in descending order
Hi R users:
I want to know how can I easily sort in descending order a
whole data frame by one or several variables.
Thank you very much for your help.
Kenneth Cabrera
krcabrer at perseus.unalmed.edu.co
krcabrer at epm.net.co
Universidad Nacional de Colombia, Sede Medell?n
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2006 Jul 30
8
Method_missing from Ruby for Rails book
I''m having a problem getting this example from the book to work:
class Cookbook
attr_accessor :title, :author
def initialize
@recipes = []
end
def method_missing(m, *args, &block)
@recipes.send(m, *args, &block)
end
end
cb = Cookbook.new
cb << recipe_for_cake
cb << recipe_for_chicken
beef_dishes = cb.find_all {|recipes| recipe.main_ingredient ==
2006 May 07
6
RuntimeError in Recipe#edit
I have tried to learn ruby on rails from scratch by going into a
tutorial at the following website.
http://instantrails.rubyforge.org/tutorial/index.html
I followed the suggestions and encountered 3 problems so far.
1. Couldn''t start the Apache server. Error message "Port 80 was used by
some other process." I over-came the problem by going
into configuration and change the
2006 Dec 11
5
Instant Rails on XP sp1 setup issue
I recently downloaded and extracted Instant Rails v1.4 on my Win XP sp1
machine. After changing and saving the windows host file and starting
the cookbook app with Mongrel, browsing to www.mycookbook.com does not
work. With Mozilla it displays ''redirecting to cookbook...'' but never
loads. It is finding the index.html in the cookbook/public dir, but the
redirect to
2006 Mar 22
2
n00b question
Total Ruby N00b here with a question about the Hibbs OnLamp tutorial.
I''m trying to hook up to my cookbook database and I''m getting:
ActiveRecord::StatementInvalid in Recipe#index
Mysql::Error: #42S02Table ''cookbook.recipes'' doesn''t exist: SELECT COUNT(*)
FROM recipes
RAILS_ROOT: ./script/../config/..
My thoughts:
I think I''m not actually
2007 Sep 27
5
New R website: R-Cookbook.com
R Community,
I've put together a website that I thought this mailing list might be
interested in: http://www.r-cookbook.com
It's a (free) community-driven content management system for R
"recipes", or working examples. Some of the features of the site are
code highlighting, recipe ratings, recipe comments, personal "recipe
boxes" to save your favorite
2004 Apr 20
2
Rank - Descending order
Dear All,
Is there any simple way to way to produce "rank", for a given
list, but in a descending order?
E.G:
x = list(a=c(1,5,2,4));
rank(x$a); produces 1,4,2,3
However I am looking for a way to generate (4,1,3,2).
It would be particularly nice if the proposed solution has all
the niceties of rank function (like NA handling and ties.method
functionality)
TIA
Manoj
2004 Dec 01
2
rank in descending order?
Hi,
Is there any simple solution to get ranks in descending order?
Example,
a <- c(10, 98, 98, 98, 99, 100)
r <- rank(a, ties.method="average")
produces
1 3 3 3 5 6
I would want this instead:
6 5 3 3 3 1
Note that reversing r doesn't work but in small examples.
Thanks,
-Jose
--
jquesada at andrew.cmu.edu Research associate
http://lsa.colorado.edu/~quesadaj Dept. of
2005 Mar 07
2
0.10.1 Upgrade problems
I just did an upgrade to Rails 0.10.1. It seems to have broken my
app. I get this error (nothing works):
ActionController::RoutingError (No route for path: ""):
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_controller/routing.rb:258:in
`recognize!''
/usr/local/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/dispatcher.rb:32:in
`dispatch''
2006 May 07
6
Unable to get past Tutorial 1 in RubyOnRails
Unable to get past Tutorial 1 in RubyOnRails
On 29 April 2006 I met some one in a Microsoft sponsored developers?
community gahering. I was told that ruby on rails is a free software,
easy to use, and in no time will have my mind blown with all the
wonderful prospects and possibilities.
After almost a week, I am still unable to get past tutorial 1 and still
unable to make any tutorials work
2006 Sep 02
7
BayLISA Puppet presentation video
Hi all,
Jennifer Davis from BayLISA has done us the service of already
posting the presentation from this past Wednesday night:
http://video.google.com/videoplay?docid=8202036065161263530&hl=en
http://video.google.com/videoplay?docid=7740462681265962824&hl=en
It''s about 2 hours total, and I can''t promise it''s any kind of
amazing presentation, but I do a
2006 Mar 16
3
How to paginate in descending order?
How can I paginate a set of fields in descending order based on their
created_on date?
For example, in a blog app, you want the very first entry on the first
page to be the most recent.
I see that paginate has an :order parameter, but I don''t see any way of
changing the direction of the order.
Thanks,
Jeff Coleman
--
Posted via http://www.ruby-forum.com/.
2001 Jan 12
1
sorting ascending descending! & THX@coling
THX.
You are right!!
a[order(-1*a)]
[1] 110 23 4 3 2
Eryk
coling wrote:
> Hi,
>
> I know very little of R, but one suggestion could be to multiply your list
> by "-1", then order, then multiply by "-1" again.
>
> Not very nice I realize. But it's "better than a poke in the eye with a
> sharp stick" as a wise man once
2006 Mar 30
2
help : No database specified. Missing argument: database.
Hi,
I''m new to Ruby programming. I''m wnt thru the example by curt in onlamp and was stuck up in the midst of configuration.
I''m getting the "No database specified. Missing argument: database." error when i tried creating a table recipe in cookbook db .
My database.yml contains the following entries
Development:
adapter:mysql
host:127.0.0.1
2010 Dec 30
1
Sorting data.frame datewise in a descending order
Dear 'HTH' R friends
I have a small dataframe as given below. I need to sort this database based on date in a decending order. I am not sure whether I have defined the date column in a proper format.
mydat<-data.frame(date = (c("1/31/2010", "2/28/2010", "3/31/2010", "4/30/2010", "5/31/2010", "6/30/2010",
2006 May 24
6
newbie question: missing template
Hi
I''m new to this forum and new to Rails so excuse me if this is a daft
question.
I''m following the ONLamp.com tuturial and all has been well untill
changing the template for the recipes. I have followed the instructions
and added this code to the controller:
class RecipeController < ApplicationController
scaffold :recipe
def list
@recipes = Recipe.find_all
end