Questions tagged [scaffold]

327 questions
11
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
  • 41,002
  • 66
  • 200
  • 371
11
votes
10 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
  • 363
  • 2
  • 12
10
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
  • 9,297
  • 3
  • 55
  • 62
10
votes
2 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
  • 20,835
  • 65
  • 174
  • 263
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
  • 434
  • 3
  • 5
  • 13
8
votes
3 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
  • 185
  • 1
  • 2
  • 9
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
  • 14,293
  • 15
  • 80
  • 124
6
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…
mactrix
  • 1,033
  • 10
  • 29
6
votes
1 answer

Define Scaffolding. (with respect to Dynamic Data and ASP.NET MVC)

There is a lot of information about how to implement and customize scaffolding with Dynamic Data and ASP.NET MVC. What exactly is the definition of scaffolding when used in this context?
smartcaveman
  • 38,142
  • 26
  • 119
  • 203
6
votes
2 answers

Grails scaffold 404 with byte[]

I'm trying to upload a file in grails. The generated scaffold is not working for me and giving me a 404 looking for 'save.jsp' Domain class Simple{ byte [] avatar static constraints = { avatar nullable: true, maxSize: 1000000 …
Oliver Shaw
  • 4,390
  • 4
  • 22
  • 34
5
votes
2 answers

Is it possible to scaffold multiple controllers in one command?

Using MvcScaffolding I can call these powershell commands to scaffold the Controllers and Views automagically. scaffold Controller Products scaffold Controller Reviews Is it possible to combine the two commands into one? e.g scaffold Controller…
Fixer
  • 5,659
  • 8
  • 35
  • 56
5
votes
1 answer

Ruby on Rails: Get next item in model

Say I have simply ran rails g scaffold book name:string about:text On the 'show' view, how would I implement a button to go to the next item in the model. I can't simply do @next = @book.id + 1 because if @book.id = 2 (for example) and I clicked…
Keenan Thompson
  • 960
  • 3
  • 11
  • 30
1
2
3
21 22