Displaying 20 results from an estimated 10000 matches similar to: "Replacing scaffolds"
2006 May 03
5
Multiple Scaffolds
I''d like to create scaffolds for each of the tables in my database, but
would like to access them below the path: localhost:3000/admin
For example localhost:3000/admin/table1
localhost:3000/admin/table2
Where table1 and table2 would be the controller names respectively,
calling their own list.rhtml, show.rhtml, edit.rhtml, etc..
Any recommendations on how/where to
2006 Aug 18
3
Understanding MVC - view customization after using scaffolds
All,
I have ordered AWDWR and am anxiously awaiting its arrival. In the
meantime I still am playing with ROR using radrails. I have a few
questions ...
I create a table named customers with the following details:
Field Type Null Key Default Extra
id int(11) NO PRI auto_increment
customer_name varchar(50) NO
inbound_retention int(11) NO
outbound_retention int(11) NO
unix_admin_email
2005 Jun 29
4
Problem connecting to MySQL
Hello, when I invoke an action of my rails web app I recieve this message:
No such file or directory - /tmp/mysql.sock
In my MySQL config file I have this line:
socket=/var/lib/mysql/mysql.sock
Why Rails doesn''t pick up this value instead of his default value?
How could I change the configuration of Rails in order to change that value?
--
/ Eduardo Yáñez Parareda /
2005 Oct 25
2
generate scaffold ignores controller parameter
Since I upgraded from Rails 0.13.1 to 0.14.1 "generate scaffold <Model>
<Controller>" doesn''t take any notice of the controller parameter. Anyone
else suffering from this? E.g.:
C:\Ruby\work\test>ruby script\generate scaffold User Admin
exists app/controllers/
exists app/helpers/
create app/views/users
exists test/functional/
2006 Jul 19
4
How do I overwrite/extend a scaffold module?
I have many pages to generate quickly. They are based off of the scaffold
generator, but I want to convert the rhtml files to Markaby, and change some
formatting. Without having to do a lot of repetitive hand editing. Is there
a simple way to overwrite/extend part of the scaffold generator? Do I need
to write my own from scratch?
--
Best Regards,
-Larry
"Work, work, work...there is no
2006 Aug 17
6
NameError in AdminController#index building scaffold
I''m a pretty big newbie with ROR, but when following a tutorial I
encounter an ugly error when building a scaffold. Here is my
environment
Dev system:
- Windows XP
- java version "1.5.0_06"
- MySQL java version "1.5.0_06"
- Ruby 1.8.4
- Ruby Gems 0.9.0
- Gem install mysql
Successfully installed mysql-2.7.1-mswin32
Installing ri documentation for
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all
I have a Model like this:
class Member < ActiveRecord::Base
attr_accessible :username, :email, :first_name, :last_name
end
I have created a scaffold using script/generate scaffold member members
Using the URL localhost:3000/members/edit/1 I can edit all attributes,
including created_at, lock_version etc.! But it should only show the
attributes I listed in attr_accessible!
What
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box
displayed at the top of the checkout as described in the tutorial and I
cannot seem to discover where I have erred.
The scaffold.css is copied from the pragmatic programmers site:
#--------------------------------------------------------------------
$ cat public/stylesheets/scaffold.css
body { background-color: #fff;
2006 Apr 03
2
undefined method `scaffold'' for #<LocationsController:0xb7a9e858>
Would anybody know why I get this error from this bit of code:
class LocationsController < ApplicationController
def index
scaffold :locations
end
end
This is the way that is demonstrated in the screencast for creating a
quick scaffold. I have done this before. However, I come back to
working with Ruby after about a month on something else and now it
gives this error.
Any
2009 May 27
4
Scaffolding Results Format
Hi Everyone,
I built a scaffold and I''m having trouble getting results properly
formatted. (I need to get the data into multiple columns instead of just
one big column) I can''t get all of my CSS to work properly in
scaffold.css, layout/books.rhtml, or the books/index.rhtml.erb Anyways,
maybe you have a suggestion.
Default view (127.0.0.1:3000/books)
Title Abstract
2006 Apr 05
13
scaffold misuse?
Running ruby script/generate scaffold Product Admin
is a wonderful way to set up well, exactly what it says, a scaffold.
My problem is that I have several other tables that are linked,
through foreign keys, to the Product table. Say an "authors" table.
Now when I go enter a new product, a book, I want the application to
provide a drop down list of authors generated from the records in
2006 Apr 20
8
generate scaffold not generating views
Hi!
Sorry for the newbie question...
I''m following the depot example in AgileWebDevelopmentWithRails.
Stangelly, generating scaffolding using the command (page 53):
./script/generate scaffold Product Admin
does not generate any .rhtml file, but just:
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists test/functional/
2006 Apr 21
6
when using scaffold flash[''notice'']
Hi,
When using the scaffold standard new / create methods, on successful
completion of creating a new database entry, is there any return
methods I cna pick up in a custom tempalte such as flash[''notice'']?
Thanks
Scott
--
Posted via http://www.ruby-forum.com/.
2006 Aug 06
4
DRY Scaffolds
I''ve got 8 scaffolds, each one can be considered an ''item'', such as a
blog, photo, etc. Using login_engine and user_engine, I list all blogs
belonging to a user by saying:
@user=session[:user]
@blogs=@user.blogs.find(:all)
but then let''s say I want to create an option where I want to slice it
differently:
@user=session[:user]
if @someOption ==1
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 09
13
Howto work with a page not generated by the scaffold ?
I am a newbie Ruby and RoR user. In my tests using the turorials that
I found over the web, everthing is working fine and I am very impressed
about RoR framework.
As I am a Delphi developer, without any web development experience,
There is some thing hard to understando and I didn''t find a tutorial
about this.
I wonder how to create a non-scaffold page ? I have customers,
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 Sep 06
1
Changing Scaffold
Hi,
I am starting a project in rails and I wish to change scaffolding.
I''ve already done some changes like prepare all texts for locale. Now
I am wishing to change the way it generates the _form partial. Could
someone give some guideline so I can study such thing?
I saw "template_for_inclusion" in form.rhtml but couldn''t find out
how to change it.
Being more
2006 Mar 09
8
Problem with scaffolding and table name
Hello, i''m new in ruby rails framework. I have the following problem. I
try to create a scaffold
for a certain model of my db, but since ruby rails doesn''t assume the
table name corectly (its incidents_reported )
i get errors ....
Besides renaming the table :) is there a way to ''tell'' ruby rails the
name of the table?
I haven''t been able to find any
2006 Feb 25
31
Ajax Scaffold Generator for Rails Released
I just released a whole new version of the Ajax Scaffold Generator (for Ruby
on Rails). The generator creates a scaffold page like the typical rails one,
except adding, editing and deleting are all done inline. The generated
scaffold is valid XHTML strict and fully styled right out of the box.
Check out the demo:
http://ajaxscaffold.height1percent.com/
And the how-to: