Displaying 20 results from an estimated 300 matches similar to: "Default Scaffolding Gives Errors"
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 May 04
9
Help: wrong number of arguments (0 for 1)
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 fine,
2006 Aug 13
5
Newbie question: scaffold not working
I went through a tutorial at
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1 to get
started with RoR. I really like the idea of the scaffold construct, but
I can''t seem to get it to work the way it was described in the tutorial.
I''ve got a mysql database that is properly configured, and a table
called ''quotes'' with a column called
2006 Feb 03
1
modifying scaffold method
I''ve made the following changes to scaffolding.rb. Is it possible to
put those changes into some type of a plugin or helper or something,
instead of directly modifying the Rails source?
(and, btw, I think pagination should be removed from scaffolding. And
deletes should only happen on post requests. That''s essentially what
I''ve changed).
Thanks,
Joe
Index:
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
2006 Jun 06
0
Scaffolding Extension - Polimorphic Associations
When I try to use it with polimorphic associations I get the following
error
In browse action:
activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
`const_missing'': uninitialized constant Privable
activerecord-1.14.2/lib/active_record/base.rb:1246:in `compute_type''
activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing''
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?
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All,
just in a spot of bother with this gem, I am trying to create a new
location and get the above msg.
here is my controller:
class LocationsController < ApplicationController
# GET /locations
# GET /locations.json
def index
@locations = Location.all
@json = Location.all.to_gmaps4rails
end
respond_to do |format|
format.html # index.html.erb
2005 Mar 03
7
Another question about the tutorial
Hello
After upgrading to ruby 1.8.2, finally got rails to install properly.
Now, following the tutorial, I found a couple of things:
First, apparently rails tries to establish local mysql connections using
"/tmp/mysql.sock"
which mandrake does not use. In mandrake 10.1, this file is located at
"/var/lib/mysql/mysql.sock".
The solution is to create a simlink
2014 Nov 01
3
Samba and NT (yes really) server
Okay you can stop laughing, yes I still have an NT server running for some
special software.
I've got a new linux machine running Samba version 3.6.23 and am having
problems getting it to connect to winXP machines to talk to their shared
printers
It can join the domain and smbtree and smbclient sort of work.
192.168.4.28 is a windows XP machine
NEW#: smbclient -L 192.168.4.28 -U
2011 Oct 22
1
virt-install with set vnc password
Hi Guy,
Anyone know how we can set up the vnc password during using virt-install
command ?
# virt-install \
--connect qemu:///system \
--name demo \
--ram 500 \
--disk path=/var/lib/libvirt/images/demo.img,size=5 \
--network network=default,model=virtio \
--vnc \
--cdrom /dev/cdrom
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
2013 Mar 15
3
reviewer comment
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20130315/7300f19c/attachment.pl>
2006 Jan 03
0
Automatically mapping content_columns?
Hi all,
Quick setup - I''ve got a table Foo. Foo has a foreign key (bar_id) to the
table Bar. The Bar table has an "id" and "name" column. Assume a 1:1
relationship.
The issue I''m trying to resolve (or rather, be lazy about) is with regards to
Foo.content_columns. By default it doesn''t pickup the foreign key. What I''m
wondering is if
2006 Mar 03
0
Does content_columns hold related data from other tables?
I''ve got a belongs_to / has_many relationship working, however I don''t
know if I can still use content_columns (or any other shortcut) in my
view that displays my object.
E.g., Employee belongs_to Department
I''m displaying an Employee.
Will content_columns contain employee.department.name?
Or how else could I do this so I don''t have to hard-code column
2006 Feb 03
1
Only iterating over the middle content_columns?
Standard behavior for the list action is to use content_columns to get
all the fields of a model and then do something with them. I''d like to
ignore some of them and iteratre over the rest. For instance I may have
A B C D ... X Y Z and I''d like to do something special with A and B and
then Y and Z, but in the middle I''d definitely like a loop to say
2006 Feb 27
1
Undefined Method Error in View
After messing around with PHP for over a year, I took one look at Ruby
on Rails and fell in love. But it''s one of those confused "Men are from
Mars, Women are from Venus" type things...
I''ve written a method which does find_by_sql to pick a random row from a
database. When I call that method I get an "undefined method ''text'' for
..."
2006 Feb 28
0
ActiveRecord: Legacy primary keys
Hi,
I''m building a frontend for a legacy schema, with tables like this:
CREATE TABLE `types` (
`a_type_cd` varchar(6) NOT NULL default '''',
`a_type` varchar(30) NOT NULL default '''',
PRIMARY KEY (`a_type_cd`)
);
The primary key is specified by the user (not auto-generated), and needs
to be updateable. I create the following a base class to
2006 Jan 30
1
how to get column_for_attribute?
Hi all,
In the code below I don''t understand:
1. Why I have to prepend overriden method content_columns with "self."
to get it working?
2. Why column_for_attribute method is not working (no such method?) even
if SomeTable is subclass of ActiveRecord::Base which have public
column_for_attribute method?
> class SomeTable < ActiveRecord::Base
>
> def
2005 Dec 29
0
Newbie: Radiobutton onclick
Hi,
I would like to make a simple html which displays the contents of a
table from a database. So I put radiobuttons near the titles of the
columns to note and do a sorting by that column. But I don''t know how
to implement that the clicking on one of the radiobuttons make the
sorting. The problem is the view part. How to give a radiobutton to
make some action on a click by the helper?