Skip to content

Instantly share code, notes, and snippets.

@gudata
Created January 1, 2017 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gudata/f58b47dbf375c2e49b91b4e36325a46f to your computer and use it in GitHub Desktop.
Save gudata/f58b47dbf375c2e49b91b4e36325a46f to your computer and use it in GitHub Desktop.

Why Rails scaffold doesn't work

The need to write a replacment of the Rails scaffold was because the build in one in Ruby on Rails

  • Does not support namespaces on the controllers and the models it generates funny paths in the views and/or controllers
  • The native way to extend the Rails scaffold was changed frequently I have to spent hours tracing github issues
  • It uses the ugly scaffold.css and it generates it all the time breaking my styles
  • Does some freaky copy/paste optimizations in the controller to get the model. Scaffold should be a starting point from where with few deletes or adding few lines of codes to make a usable screen.

The new aproach

With scaffold_pico you can create your own pretty administration in a second.

  • No learning curve - if you know Rails you know it.
  • No 3rd party gems slowing your development/production startup times.
  • Clean code
  • Supports namespaces in the models and the controllers

There is also some sugar. With the pico_scaffold you can generate from the begining fabricators and take care of N+1 by specifying joins/includes clauses. There is separation of the fields for index and editing. There is a search - almost every screen nowdays has search.

Supports Zurb Foundation, Materializecss CSS frameworks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment