Questions tagged [scaffolding]

Scaffolding is a meta-programming method of building database-backend software applications.

Scaffolding is a meta-programming method of building database-backend software applications. It is a technique supported by some model-view-controller frameworks (like Ruby on Rails, CodeIgniter, Spring Roo among many others) in which the programmer may write a specification that describes how the application database may be used. Some tool uses this specification to generate code to cover basic CRUD (Cread Read, Update, Delete) functionality, effectively treating the template as a scaffold on which to build a more powerful application. (View Wikipedia definition)

In many cases this scaffold can and has to be modified if we want to achieve more complex functionality and it's a reason why this feature is not recommended in complex sites.

Recently the term scaffolding has also been used for the use of pre-defined layouts or grids in CSS frameworks like Twitter-Bootstrap.

1070 questions
0
votes
4 answers

Is Scaffold in rails 3.2 a better option?

I am new to ruby on rails.I want to know why do we use scaffold and should we run scaffold directly after the bundle install process. I read somewhere that we have to first create controller by doing:- rails generate controller and then run the…
SemperFi
  • 2,358
  • 6
  • 31
  • 51
0
votes
1 answer

Rails scaffolding belongs_to - showing #

Experienced Java developer, new to Rails - wondering about belongs_to relationship in scaffolding. Saw another answer like this Does rails scaffold command support generate belongs_to or many to many model middle table migration info? and followed…
wrschneider
  • 17,913
  • 16
  • 96
  • 176
0
votes
2 answers

How do I troubleshoot routes in Laravel 3? (using the scaffold bundle)

Just starting with Laravel. I've installed it on my wamp server and setup a virtual host in apache. The standard home controller works fine. I've installed the scaffold bundle and generated a blog according to the description at the bundle's github…
Gabriel Smoljar
  • 1,226
  • 2
  • 14
  • 32
0
votes
1 answer

MVC4 - How to rearrange generated fields created by Scaffolding

I have a .cshtml file created by MVC4 scaffolding that looks something like this: @using (Html.BeginForm()) { @Html.ValidationSummary(true)
BicycleSellerListing
Hosea146
  • 7,412
  • 21
  • 60
  • 81
0
votes
2 answers

NoMethodError in basic scaffolded View?

I created a basic scaffold for a Foo model with a single property - bar:String foos/new.html.erb:

New foo

<% form_for(@foo) do |f| %> <%= f.error_messages %>

<%= f.label :bar %>
<%= f.text_field :bar %>

toma
  • 5
  • 2
0
votes
1 answer

Generating scaffolding for existing model

Newbie to RoR here. I have built models with no namespace. One of them is called 'Brand'. I then proceeded to use rails g "admin/brands" to put maintenance functionality under an admin namespace, using rails generate scaffolding_controller…
NDK
  • 41
  • 5
0
votes
1 answer

Model Field from DropDownList with Scaffolding

In my Model, I want to be able to select a property's value through a DropDownList. Like this: public int Foo { get; set; } private IEnumerable FooOptions = new IEnumerable { "Foo", "Bar" }; So, in the rendered html, I'd have…
André Leria
  • 392
  • 3
  • 17
0
votes
1 answer

CakePHP 2.2 Categories Tree Scaffolded - Parent not Showing

I'm using CakePHP to manage a web application that has some categories, which have the following SQL database. I've included my controller and class name. Basically I have no need for anything other than what I would consider the "normal"…
0
votes
2 answers

change id back to rowid after 'rails generate scaffold scaffoldname name:string id:integer'

I've got a problem with an id column created with a scaffold. I generated a scaffold with following command: rails generate scaffold scaffoldname name:string id:integer I used that id column for a relation which I wanted to use for a dropdown menu…
coderuby
  • 1,188
  • 1
  • 11
  • 26
0
votes
2 answers

Why my RoR destroy links don't work?

there is a problem puzzling me for quite a time now related to Ruby on Rails applications. I tested the very same workflow in 3 different environments and in none of them I am able to get the "destroy" links to work! Using this setup: RVM…
Apollo
  • 1,913
  • 2
  • 19
  • 26
0
votes
2 answers

Error: The subfolder for admin templates does not exist or is spelled wrong

I have tried to Generate Custom Template using oil Scaffold on FUELPHP. Move oil/views in oil/views/my_custom run php oil generate scaffold/my_custom -f monkey name:string description:text the result is Error: The subfolder for admin templates…
viyancs
  • 2,289
  • 4
  • 39
  • 71
0
votes
2 answers

Rails Scaffolded reference wont save due to mass-assign restriction

I'm brand-spankin'-new to rails, so forgive me if this is a stupid question -- i simply cannot piece together enough answers to tell if i started incorrectly. Here goes. i created everything related to my Company model with rails g scaffold Company…
Kristian
  • 21,204
  • 19
  • 101
  • 176
0
votes
1 answer

Define table headers in Grails domain class for view generation

I want to be able to define view table headers in domain classes. I thought about creating a transient property called inTable and then iterate through its values in scaffolding template. Here is a transient property: List…
Feras Odeh
  • 9,136
  • 20
  • 77
  • 121
0
votes
2 answers

adding a list of objects (of a class written by me) to a existing class

I have a class persons and a class subjects. at the moment they are not connected at all. As a user one can only chose subjects from a list and inspect them. Now I'd like to allow users to assign to subjects, thus the user class needs a list where…
0
votes
1 answer

new model index page , shows other model index page

I have generated new model with : rails generate scaffold site Then I am trying to show all entries , but instead of showing /sites it shows /devices > rake routes > test_on GET /test/on(.:format) test#on test_off GET …
Dmitry Sterh
  • 81
  • 2
  • 11