Displaying 20 results from an estimated 7000 matches similar to: "easy scaffold question(s)"
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
2012 Apr 25
2
Rails 3.1 - Scaffolding Files
Where can I find more information about the new syntax on these:
<%- model_class = @product.class -%>
<h1><%=t ''.title'', :default => t(''helpers.titles.new'', :model =>
model_class.model_name.human,
:default => "New
#{model_class.model_name.human}") %></h1>
<%= render :partial =>
2006 Jun 12
3
Weird problem related I am having with scaffold
i,
I have this in expense_controller.rb:
class ExpenseController < ApplicationController
scaffold :expense
end
It works fine, but let''s say I want to override scaffold''s list.
For some reason, just making list.rhtml in views\expense is enough, and
there''s no need to add
def list
end
in expense_controller.rb. However, that''s not my real problem.
Now
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 Jan 19
6
One Last Question for me..
And then I should be ready to roll with my project.. I have some fine
tuning of the looks to do after, but funtionality first!
This is probably a rails question.. but I''m not sure where to sign up
for the rails questions email group? (I guess I turned this into a 2
question email).
I''ll ask here and then if someone will send me the url of where I go
to sign up for the rails
2010 May 10
7
NilClass passed to partial view
Hi,
I have a simple program that tries to do something really basic.
First, I have a company Model :
-------------------------------------
class Company < ActiveRecord::Base
has_one :billingAddress, :foreign_key=>"id", :class_name=>"Address"
end
Then I have the address Model :
--------------------------------------
class Address< ActiveRecord::Base
belongs_to
2006 Mar 03
2
newbie scaffold question
I''ve got a database with several tables. I''d like to create scaffolding
for separate CRUD interfaces for several of these tables. I''m hoping
that the scaffold generator can create the CRUD code for all these
tables in ONE controller, but I don''t know how to tell it to do that, if
it can.
Can anyone verify if this is possible?
Thanks,
David
--
Posted via
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 Jul 26
3
newbie: Scaffold doesn''t pickup DB changes
I''m following along with the depot example in ''Agile Web Development'' and ran into a problem with Scaffold. I changed the MySQL table structure to add a few columns directly and also tried the migrate script to change the database after I got the initial scaffolding to work. However, I can''t seem to get the new columns to show up and am stumped as to how I can
2006 Jul 06
2
Scaffold with Foreign Key fields possible?
When you do a scaffold, is there a fast way to force it to let you enter
in data for any foreign/primary key fields?
Thanks,
Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 Jan 13
4
missing foreign key fields in scaffold views
Is there any reason that foreign key fields do not show in any of the
scaffold views ?
project table:
id serial primary key,
category_id integer,
user_id integer,
name varchar,
morestuff varchar
foreign key (category_id) references categories(id),
foreign key (user_id) references users(id)
scaffold generated views only show name, morestuff fields
2006 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone,
I''m a rails & ruby nuby, and this is my first post to the list.
Here''s my environment in case it helps diagnose my problem:
Ruby version
1.8.4 (powerpc-darwin8.6.0)
RubyGems version
0.8.11
Rails version
1.1.2
Active Record version
1.14.2
Action Pack version
1.12.1
Action Web Service version
1.1.2
Action Mailer version
1.2.1
Active Support version
1.3.1
I did
2006 Mar 15
10
Scaffold with Foreign Key
I have two tables:
------------------------------
drop table if exists users;
create table users (
id int not null auto_increment,
username varchar(100) not null,
password varchar(20) not null,
firstname varchar(20) not null,
lastname varchar(20) not null,
primary key (id)
) TYPE = InnoDB;
------------------------------
drop table
2009 Dec 10
2
How to customize the default scaffold?
I know the scaffold generator is really only useful for beginners
and/or very the preliminary state of a project, but I find that I use
it a lot (especially, since I am still a beginner). There are a
couple of things I find myself tweaking (or wanting to tweak, but
never getting around to tweaking) each time I generate a new scaffold:
1) Change the layout from blah.html.erb to
2006 Jun 28
9
Scaffold Issue with Postgres
Hi guys,
I''ve been able to successfully install the postgres adapter for a remote
database machine to get rails up. My machine is running on Fedora 2.
Rails version 1.1.2. Is my yml config correct? I am getting this error
when I execute script/generate scaffold service_contents content :
exists app/controllers/
exists app/helpers/
create app/views/spiel
exists
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:
2006 Jul 31
3
Missing controller default code
Hello,
I generated a controller, using the command:
ruby script/generate controller my_kontroller my_model
The generated controller file, however, contains an empty class
definition. The default controller code is missing.
Any idea what went wrong?
Thanks,
gk
--
Posted via http://www.ruby-forum.com/.
2006 Jan 08
4
scaffold uses link_to for destroy
Hi,
I wonder why scaffolding uses a link_to tag for the destroy links.
Seems like these should be POST requests with button_to. The Rails
book dedicates pages 335-337 to this very issue.
Peter
2006 Feb 08
3
ungenerate / remove scaffold command?
I have seen this somewhere and can''t find it now. Is there an ungenerate
or remove command for the scaffold generator. It would be easier than
removing all the files by hand.
I have tried ./script/ungenerate but no luck.
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 Jul 16
2
Can scaffold do tall tables instead of wide?
I''m trying to get data in rows instead of columns by default.
The default scaffold behavior is to create an initial table layout with
column headers along the top. In some cases this creates really wide
tables which require horizontal scrolling. Is there a parameter I can
use with scaffolding or a hack to get the header cells along the left
side of the table instead?
I''m