Questions tagged [scaffold]

429 questions
3
votes
1 answer

EntityFramework Core database first, Scaffold-DbContext A positional parameter cannot be found that accepts argument '--use-database-names' error

I am trying to create the model from existing DB using EntityFramework Core, database first approach. The model was created, but the table name and column name were changed to C# style. Because I want the model still using exact table name and…
wltz
  • 621
  • 1
  • 11
  • 22
3
votes
1 answer

"rails generate scaffold" error on "_from.erb" (jbuilder issue?)

I'm relatively new to Ruby and Rails, been teaching myself in free time. I recently added a few gems to my gemfile, and now my scaffold is giving me errors--couldn't find another answer on StackOverflow that addressed my issue (apologies in advance…
Cody
  • 436
  • 5
  • 13
3
votes
1 answer

MVC3 - Scaffold Template (Field Order)

When using the following dialog to add a view, is there anyway you can state in what order you want the fields created? I tried [Column(Order=0)] ::: [Column(Order=12)], but no joy! Thanks Paul
Paul Brown
  • 4,926
  • 9
  • 32
  • 44
3
votes
1 answer

MvcScaffold not creating my related dropdowns correctly

MvcScaffold Version: 0.9.7 Okay, so MvcScaffold generates this code for me in my _CreateOrEdit.cshtml partial view:
@Html.DropDownListFor(model => model.LocationId,…
Paul Brown
  • 4,926
  • 9
  • 32
  • 44
3
votes
4 answers

Entity Framework Core: Automated DB scaffolding into a class library

Following this tutorial it is possible to scaffold a database context using Entity Framework Core via the command line. Scaffolding has some strange requirements it needs an entry point aka main method (no scaffolding into class libraries) the…
monty
  • 7,888
  • 16
  • 63
  • 100
3
votes
2 answers

Does rails scaffold command support generate belongs_to or many to many model middle table migration info?

Product,Category is two model on rails3 the relation between them are follow: product has_and_belongs_to_many categories category has_and_belongs_to_many products i can use scaffold generate migration for this two modle use rails g scaffold product…
mlzboy
  • 14,343
  • 23
  • 76
  • 97
3
votes
1 answer

Override controller test scaffold for rails 5

I tried to override the controller test generator for scaffolding in rails 5. I found the original file, but can't place it in the template directory. If I read correctly this post Changing scaffold-controller-generator-templates in Rails, the path…
Cédric ZUGER
  • 422
  • 4
  • 12
3
votes
1 answer

Rails: after using scaffold, I can't migrate

[rails 4.1.6, ruby 2.1.3p242 ] 1.set the database.yml database: bookshop , and created the bookshop database in my database. 2.create a new table books with id int(10), name varchar(45) by SQL( I use MySQL). 3.everything is Okay, I can open the…
Johnn
  • 105
  • 2
  • 10
3
votes
2 answers

rails destroy scaffold leaves back table

I created a new scaffold using the command: rails generate scaffold level But then I destroyed it using the command rails destroy scaffold level And then again added it back using the command rails generate scaffold level question:string…
anonn023432
  • 2,940
  • 6
  • 31
  • 63
2
votes
1 answer

Undefined method `groups' error when running generate scaffold command

I am absolutely new to Ruby and Rails and I am getting an error when running this command: rails generate scaffold User name:string email:string Here is the full error I am getting: /Users/ad7863/rails_project/demo_app/config/application.rb:7:…
2
votes
2 answers

Grails scaffolding is displaying fewer columns than the domain

I have 6 columns in my domain class. But i only see 5 columns on the controller list when scaffold is set to true. My database is mySql. When executed table is created with correct number of columns My domain class class RouteDesc { String…
Vicky Singh
  • 271
  • 1
  • 3
  • 7
2
votes
0 answers

ASP.NET DynamicData Validate Custom Image FieldTemplate

I've created a custom Image Field Template which works fine. I decided to create some kind of validation for image sizes so I've created a custom validation attribute. here is the code: public class ImageSizeValidator : ValidationAttribute { …
mani_007
  • 628
  • 7
  • 14
2
votes
1 answer

Entity framework code generation tool

I have used Subsonic ORM in ASP.NET. It has Scaffold user control that generates web forms for list/insert/edit/delete etc. I want to know is there anything like this in ASP.NET Entity Framework?
hotcoder
  • 3,176
  • 10
  • 58
  • 96
2
votes
1 answer

filter on relation, activescaffold

I have this code: class ArticlesController < ApplicationController active_scaffold :articles do |config| config.label = "Manage my articles" config.actions.exclude :show form_cols = [:name, :summary, :content, :author, :category,…
Mauro
  • 131
  • 2
  • 13
2
votes
3 answers

A REAL quick, basic CSS layouter

Short story: I frequently have to work on many different, rather small, web pages. Most of them are layouted with pure CSS. My Problem: My job is to work on the code itself, on the functionality of the pages, not on the layout. However, due to the…