Sha256: fac22ea7e7fda6a918e8c68f926f78acb5dd7e7e6bc68db326cabad6d265001b
Contents?: true
Size: 1.97 KB
Versions: 7
Compression:
Stored size: 1.97 KB
Contents
= Nifty Generators A collection of useful Rails generator scripts for scaffolding, layout files, authentication, and more. Forked from @ryanb, minnor improves so far, like a changed css, limitited :string fields by their :limit Made to be compatible with jQuery == Setup === Rails 3 Add the gem to your Gemfile. gem "flockonus-nifty-generators", :group => :development Then you can run any of the included generators. rails g nifty:scaffold Recipe name:string index new Yes, you <b>can't</b> have it alongs the original <b>nifty-generator on your Gemfile</b> == Included Generators * nifty:layout: generates generic layout, stylesheet, and helper files. * nifty:scaffold: generates a controller and optional model/migration. * nifty:config: generates a config YAML file and loader. * nifty:authentication: generates user model with sign up and log in. To view the README for each generator, run it with the +help+ option. rails g nifty:layout --help == Troubleshooting and FAQs <b>What is the difference between nifty:scaffold and built-in scaffold?</b> One of the primary differences is that nifty:scaffold allows you to choose which controller actions to generate. rails g nifty:scaffold post name:string index new edit There are a few changes to the generated code as well, such as no XML format by default. It also offers support for HAML, Shoulda, and RSpec. <b>I get "undefined method 'title'" error.</b> Try running nifty:layout, that will generate this helper method. Or you can just change the templates to whatever approach you prefer for setting the title. <b>I can't set new attributes in my model.</b> Add the attribute to the attr_accessible line in the model. <b>I get "undefined method 'root_url'" error.</b> Some generators default redirecting to the root_url. Set this in your routes.rb file like this (substituting your controller name). root :to => "home#index" <b>I get a missing database error.</b> Run <tt>rake db:migrate</tt>. == Found a bug? Fork
Version data entries
7 entries across 7 versions & 1 rubygems