Questions tagged [scaffold]

429 questions
13
votes
2 answers

Flutter Navigation Drawer that actually navigates

I have a simple Scaffold with a drawer and a body. I want to select an item in the drawer and have the scaffold's body navigate to a new view. Most approaches that i found (like this) just use a stateful widget and change its state when the drawer…
Simiil
  • 2,281
  • 1
  • 22
  • 32
12
votes
2 answers

rails g scaffold for existing model and DB table

I would like to create a structure with rails g scaffold Article, but I have already created the table Articles and model Articles. Is there any way to do that?
user984621
  • 46,344
  • 73
  • 224
  • 412
12
votes
1 answer

How do I create many-one relationships using Scaffold?

I'm new to Ruby on Rails, and I'm trying to create a bass guitar tutor in order to teach myself RoR (and bass guitar). The walkthroughs use Scaffold to create ActiveRecord classes, but they seem to correspond to standalone tables; there's no use of…
Simon
  • 25,468
  • 44
  • 152
  • 266
11
votes
3 answers

How to have the scaffold to generate another partial view template file

I'm trying to customize my scaffold generator, and I would like to have a new partial for the view in the same directory, in particular _item to be called both inside index and show. I can get all the templates but I'm not able to generate this file…
ecoologic
  • 10,202
  • 3
  • 62
  • 66
10
votes
3 answers

Exception has been thrown by the target of an invocation thrown when scaffolding a controller

I created a separate Class Library project to store the Database Context and Model Classes. In the same solution, I created an ASP.NET MVC project and referenced the Class Library project, as well as include the Connection String for the Database…
user3315406
9
votes
5 answers

How to change routes in ruby on rails?

I just installed Ruby on Rails and created a scaffold called posts. RoR generated controllers and other required files for me. I created a new method in posts_controller, but I can't access it. I looked at other methods that are in the controller…
Moon
  • 22,195
  • 68
  • 188
  • 269
8
votes
2 answers

Need to create a foreign key when creating a table on Rails?

i'm starting now on Rails, i looked in the forum, but i didn't find anything that could solve my problem. Here it goes, I have a Category table, and it has only name for a column (there is no repetition in categories) so i would like name to be the…
Márcio Duarte
  • 453
  • 3
  • 5
  • 14
8
votes
3 answers

Can I dock a floating action button in a CupertinoTabBar?

I would like to know if there is a way to dock a floating action button in a CupertinoTabBar. I would like to get the results as in the picture below My screen is organized as follow…
M4trix Dev
  • 1,828
  • 3
  • 23
  • 48
8
votes
4 answers

How to hide drawer in flutter after changing Scaffold.body value

I am using the method in this question to change the body of a Scaffold in flutter: Flutter Drawer Widget - change Scaffold.body content The method described works perfectly. Now I would like just the drawer to automatically close after the users…
juanarzac
  • 353
  • 1
  • 3
  • 11
7
votes
2 answers

How to prevent a jetpack compose scaffold from taking the whole height of the screen when it is shown in a dialog

I am having an android activity which has Base.Theme.AppCompat.Light.Dialog as a theme on tablets and therefore is shown in a dialog. When I used XML layouts I could set a min height with wrap content for the layout so it would Be at least x dp…
Henning
  • 2,202
  • 1
  • 17
  • 38
7
votes
2 answers

Is it correct to have nested Scaffold in Flutter?

I have a PageView in my app homepage and I want: The AppBar changes according to the page The BottomAppBar is fixed The 2 solutions I imagined are: The hard one: have one Scaffold with appBar, body and bottomNavigationBar; use the PageView's…
Galactose
  • 175
  • 3
  • 8
7
votes
3 answers

Rails 3 => Undefined method 'array' when I try to rake db:migrate

This is my first post here so go easy. I am trying to build my first app in Rails 3.2.1. I am trying to generate a scaffold for Paint using the following terminal command: rails generate scaffold Paint paint_family:string paint_hex:array…
ErikAtLarge
  • 83
  • 1
  • 7
6
votes
3 answers

adding extra attribute to a rails command

While trying to generate a new scaffold using - collection> rails generate scaffold Items name:string subcategory_id:integer users_id:integer, i missed out the 'users_id:integer' and way i can go about having this attribute on it and not…
El nino
  • 239
  • 5
  • 14
6
votes
1 answer

Ruby/Rails: where is the code to generate scaffolds

I was browsing the code at github.com/rails/rails, and I couldn't figure out where the code was to generate Rails scaffolds. Can anybody shed some light on this?
Jay Godse
  • 15,163
  • 16
  • 84
  • 131
6
votes
1 answer

How to change topBar corresponding screen in Jetpack Compose

I have a Scaffold like this: Scaffold( topBar = { TopBar(...) }, bottomBar = { BottomNavigationBar(...) } ) { NavHost(...) } What is the best way to change TopBar when I navigate to another screen?
1
2
3
28 29