Displaying 20 results from an estimated 700 matches similar to: "Help: wrong number of arguments (0 for 1)"
2006 May 03
0
Newbie Help
Is it my environment? Is something wrong, cause I thought this should
just work?
I have a simple table and I created a model and a controller:
ruby script/generate controller Restaurant
ruby script/generate model Restaurant
I edited the controller to this:
class RestaurantController < ApplicationController
scaffold :Restaurant
end
I run it and:
http://0.0.0.0:3000/Restaurant works
2006 Feb 16
6
http://127.0.0.1:3000/
Hi,
I installed ruby on rail on my windows system.
I sucessfully made one database related application.
But when i want to execute it, i have to give url like
http://127.0.0.1:3000/wedding/ etc.
can''t i browse through my browser?
192.168.0.51 is my ip.
Another one thing is i never get file named new in my example then also
it executes file called new for database inserting ,how it is?
2006 Dec 28
1
Default Scaffolding Gives Errors
This is the default scaffolding for list.rhtml:
[code]
<h1>Listing <%= @scaffold_plural_name %></h1>
<table>
<tr>
<% for column in @scaffold_class.content_columns %>
<th><%= column.human_name %></th>
<% end %>
</tr>
<% for entry in instance_variable_get("@#{@scaffold_plural_name}") %>
<tr>
<% for
2006 May 06
0
RE: Rails Digest, Vol 20, Issue 156
I am looking for a ruby hosting service. Can any one recommend one for me.
-----Original Message-----
From: rails-request@lists.rubyonrails.org [mailto:rails-request@lists.rubyonrails.org]
Sent: Saturday, May 06, 2006 7:37 AM
To: rails@lists.rubyonrails.org
Subject: Rails Digest, Vol 20, Issue 156
Send Rails mailing list submissions to
rails@lists.rubyonrails.org
To subscribe or
2020 May 30
3
Cargar archivo .RData desde OneDrive, Google Drive o Dropbox
Hola, gracias por la respuesta.
Yo también puedo descargar el fichero pero no lo carga de forma correcta:
> drive_download("
https://drive.google.com/file/d/1iN7rT-W8WoXsdBpKzxcatFx7nGPWNkuz/view?usp=sharing
",
+ overwrite = TRUE, verbose = TRUE)
File downloaded:
* restaurant.RData
Saved locally as:
* restaurant.RData
> restaurant <-
2006 Mar 14
3
Help doing find - look for nonempty habtm
I''ve got a Cuisine and a Restaurant model, with a habtm. One thing I
want to do is find all the cuisines that have at least one restaurant
associated with them. Right now I''m using the following SQL query:
SELECT DISTINCT(cuisines.*) FROM cuisines, restaurants,
cuisines_restaurants WHERE cuisines.id =
cuisines_restaurants.cuisine_id AND restaurants.id =
2020 May 30
3
Cargar archivo .RData desde OneDrive, Google Drive o Dropbox
Hola a todos, espero que todo esté marchando bien.
Estoy intentando cargar un archivo con extensión .RData desde OneDrive,
Google Drive o Dropbox.
Con OneDrive he intentado lo siguiente:
temp <- tempfile()
download.file("
https://alumnosuatedu-my.sharepoint.com/:u:/g/personal/rivaldez_uat_edu_mx/ESNKsBZE5rhMp4_shdbavXEBz4mUuIaeKWIXlMMlpyqyUA?e=NfZupt
",
temp, method =
2005 Dec 16
3
Adding methods to models
All,
This is more of a theoretical question I suppose - I''m looking for what the
consensus is for the "correct" approach in Rails/MVC.
I have a standard security model where a User can have many Roles. There is
a User model, a Role model, and in the db, a linking table, etc. Each role
has a name as well as a category (say, name="waiter", category="restaurant
2010 Jul 15
2
Search and extract string function
Hi all,
I'm trying to write a function that will search and extract from a long
character string, but with a twist: I want to use the characters before and
the characters after what I want to extract as reference points. For
example, say I'm working with data entries that looks like this:
Drink=Coffee:Location=Office:Time=Morning:Market=Flat
2006 Jul 09
1
Quick Question
I have this method in a controller
def sort_by_cuisine
#@restaurants = Restaurant.find(:all, :conditions => ["cuisine_id =
:id", params], :order => params[:sort])
@cuisines = Cuisine.find_all
end
And I want to put the bulk of it in the model, but still call it from
the controller. How can I do this? I''m fairly new to Ruby on Rails and
I''ve tried
2006 Jul 31
9
Multiple Pagination
I have the following:
def index
begin
@restaurant_pages, @restaurants = paginate :restaurants,
:order => (params[
:sort ] || "name"),
:per_page => 2
@cuisines = Cuisine.find_all
rescue
redirect_to :action => :index
end
end
# sort by cuisine
def
2005 Oct 28
1
SF Beer & Pizza SIG - review and forecast
Wednesday''s Beer & Pizza SIG was attended by about a dozen Rubyists,
plus one extremely well-dressed gentleman (no hacker he!) who was on
the prowl for Rubyists to hire. Beer and Pizza (among other things)
were consumed, Ruby (among other things) was discussed, and everyone
appeared to have a good time.
The upcoming SIG will, as announced previously, be held just up the
street at
2007 Jan 18
8
How can I find out which attribute is screwing up pluralize/singularize?
Hey there :)
I''m creating this app on top of a legacy database, that has a mixture
of auto_inc ids, non-''id'' named pks, non-integer-pks, foreign keys that
end in _code instead of _id, etc.
I have the model working great in the console, where I can create any
modeled object and reference other objects without issues.
However, I''m running into problems with
2004 Dec 17
3
Paris Meeting Date/Time/Location
The Paris Asterisk meeting will be held Monday, December 20, 2004 at 1
p.m. at "Les Vendanges"--a wonderful restaurant in the 14th (tel
01.45.39.59.98). However, we have to let them know exactly how many
people will attend, so PLEASE RSVP as soon as possible.
The address is 40, rue Friant, and the metro station is Porte d'Orleans,
the end of line 4. Take Sortie Boulevard Brune,
2005 Dec 14
1
Need help for a statistical problem
Hello Dear
I need to select among 700 objects a good
representative sample. These
objects
could be residential houses, commercial buildings,
trucks, etc.
How to get a good sample size and select a set of
objects that is very
representative.
The second part of my question is to find a
statistical model in R that
detects objects that are most
likely used as their owners told the municipality. For
2006 May 02
9
Updating only one field
At present, I use an update like this to set the user''s last login time:
authenticated_user.update_attribute(:last_login, Time.now)
However, this calls the following, updating all fields:
UPDATE users SET `last_login` = ''2006-05-02 13:27:41'', `hashed_password`
= ....
Is there any way I can tell ActionRecord to only update the one field?
I don''t really want
2004 Dec 21
1
Small PBX to VoIP transition questions
This is for a small business (restaurant and catering). We want to move
from POTS
to VoIP to save on the phone bill. Currently we use four lines for
voice + one fax going into a Lucent Partner system PBX.
Right now I'm considering two alternatives, both powered by * and a
SIP/IAX wholesaler (any recommendations on that for someone who can do
LNP on DIDs in Boston, MA, USA area are gladly
2006 Mar 22
1
How do you clean up this cryptic code?
So, I''m coding my school project in Rails.
There are two models, User and Restaurants.
I noticed that in Restaurants, when you use the belongs_to method, you
could specify the condition of the associated table. There are a few
types of users, in the user_type column of the users table - owners is
type 1, users are type 2.
So in my haste to hand in enough code, in the Restaurant model,
2011 Jul 27
3
[LLVMdev] LLVM Bay-Area Social!
If you're not in the San Francisco Bay-Area, you can stop reading this
message now.
I'd like to announce the inaugural LLVM bay-area social gathering to take
place on Wednesday, August 3rd, 7pm at St. Stephen's Green in Mountain View.
They have good food, lots of beer and are a short walk away from the
Mountain View Caltrain and VTA station. This is the perfect time to meet
your
2009 Oct 15
10
AJAX - how to have multiple select form sets implemented?
hi, there :)
Consider a blogging application whereby a user is trying to add a new
blog.
He/she has to select a category. Upon selecting a category from a drop
down box, a new sub categories drop down box will be created (hence an
AJAX call). Got this implemented and it''s ok.
Now, let''s assume that a given blog can have multiple categories (and
subcategories).
For example, a