Questions tagged [scaffold]
429 questions
354
votes
16 answers
Scaffold.of() called with a context that does not contain a Scaffold
As you can see, my button is inside the Scaffold's body. But I get this exception:
Scaffold.of() called with a context that does not contain a Scaffold.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends…

Figen Güngör
- 12,169
- 14
- 66
- 108
68
votes
4 answers
Ruby on Rails Generating Views
Is there a way to generate the views separately using the rails generate command? I would also be willing to install a gem to accomplish that task f one exists. Basically the scaffolding command gives me too much and I would rather code my…

Jason Yost
- 4,807
- 7
- 42
- 65
49
votes
6 answers
Create Ruby on Rails views (only) after controllers and models are already created
I've obtained a project that have controllers (minimal code only) and models, but the views are missing. Is there a way to generate the views only using scaffold or another tool?

Sean
- 2,018
- 4
- 25
- 32
33
votes
12 answers
How to fix black screen in flutter while Navigating?
I am creating a multi-paged app on flutter. When I am using the navigation in it, I am getting a black screen.
import 'package:flutter/material.dart';
void main() => runApp(MyHomePage());
class MyHomePage extends…

Shahbaz
- 805
- 2
- 8
- 20
32
votes
3 answers
Is there a way to generate a rails scaffold without the views?
Is there a way to generate a rails scaffold without the views, there has to be a better way then generating the scaffold and deleting the views and the view specs.

Ibrahim Muhammad
- 2,808
- 4
- 29
- 39
31
votes
4 answers
difference between scaffold and model in Rails
What's the difference between generating a scaffold and generating a model in Rails? What are the advantages/disadvantages of doing either?

jazzyfresh
- 751
- 1
- 6
- 11
29
votes
19 answers
Odoo - scaffolding?
I read here that you can scaffold a module using a command, so you won't need to manually create some initial files. But such command does not work on master (on Odoo development branch):
./oe scaffold Academy ../my-modules
Because there is no such…

Andrius
- 19,658
- 37
- 143
- 243
28
votes
3 answers
How can I make scaffold only for controller and views if model already exists?
I already have set up Devise to My App.
So User model is already generated, and exists by installing Devise
Now I'd like to add my own controller users_controller.rb and its views index and show.
How can I make scaffold without affecting to User…

MKK
- 2,713
- 5
- 31
- 51
27
votes
3 answers
Rails scaffold without the css file?
Is there a way to generate a scaffold in rails 3.0 so that scaffold.css does NOT get created? Something at the command line I can enter to skip that step?
Thanks

Brett
- 2,775
- 4
- 27
- 32
27
votes
3 answers
Background Image for Scaffold
I want to set the image as the background color for Scaffold. When setting an AppBar and bottom bar, using the decoration of the Container as the body of the scaffold doesn't cover the complete screen.
I want to show background for full…

Ankur Prakash
- 1,417
- 4
- 18
- 31
24
votes
4 answers
Can generate scaffold put the controller in a namespace?
I want to generate the scaffold in a Rails app, generating the model as usual but having the controller inside the admin namespace. Is it possible?

Pablo Fernandez
- 279,434
- 135
- 377
- 622
22
votes
3 answers
Can't migrate database after scaffold. Section 2.2 Ruby on Rails Tutorial Michael Hartl
I'm working through the Hartl ruby on rails tutorial (section 2.2), and I'm having trouble migrating the database. Everything seemed to be working, and then I ran rails generate scaffold User name:string email:string Afterwards I tried to run…

Hopscott
- 251
- 2
- 6
19
votes
2 answers
Should I use Scaffold in every screen ? what are best practices while using topBar, bottomBar, drawer, etc. in compose
I am writing an android application pure in compose and I am using scaffold in every screen to implement topBar, bottomBar, fab, etc.
My question is should I be using scaffold in every screen or just in MainActivity?
what are the best practices…

Sahibjadatalib Ansari
- 313
- 2
- 8
15
votes
2 answers
Skip jbuilder files when I generate a scaffold?
When I scaffold I don't want it to generate these files:
invoke jbuilder
create app/views/tests/index.json.jbuilder
create app/views/tests/show.json.jbuilder
But how? in my application.rb I have this:
config.generators do |g|
…

Filipe Fernandes
- 167
- 1
- 8
14
votes
5 answers
Rails: Scaffold to automatically do one-to-many relationship
Not sure if I'm reading this right, but it seems like Scaffold will not do a one-to-many relationship in its entirety. For instance, if I create messages with scaffold and then I want comments on those messages (one message -> many comments), I have…

Dan Rosenstark
- 68,471
- 58
- 283
- 421