nifty-generators icon indicating copy to clipboard operation
nifty-generators copied to clipboard

Formtastic Support

Open ryanb opened this issue 15 years ago • 3 comments

There should be a --formtastic option one could pass in nifty_scaffold or nifty_authentication which would use the simplified formtastic methods to generate form fields.

ryanb avatar Oct 02 '09 23:10 ryanb

I have implemented a solution in a fork that makes use of formtastic, use the --formtastic option. Currently this only works for nifty_scaffold. See: http://github.com/iceburging/nifty-generators

iceburging avatar Jan 22 '10 13:01 iceburging

You may also want to alter the application.html.erb for the following two lines by specifying 'script/generate nifty_layout --formtastic'.

  1. HTML Tag

... instead of ...

<html>
  1. CSS Tags to Include Formtastic Stylesheets
<%= stylesheet_link_tag 'application', 'formtastic', 'formtastic_changes' , :cache => 'base' %>

...instead of...

<%= stylesheet_link_tag 'application' %>

Man, I really should learn how to do that myself. It doesn't seem all that hard.

greenplastik avatar Jan 24 '10 05:01 greenplastik

Formtastic does not need this with html5:

xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"

sekrett avatar Dec 30 '10 07:12 sekrett