Every repository with this icon (
Every repository with this icon (
| Description: | A collection of useful Rails generator scripts. edit |
-
rake test - stack level too deep (SystemStackError)
5 comments Created 3 months ago by jeffkreeftmeijerall of a sudden I started getting this error when trying to run
>rake test:
http://gist.github.com/151904.- OSX 10.5.7
- Ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
- Rails 2.3.2
- newgem (1.5.1)
- rubigen (1.4.0)
forked nifty-generators to include rubigen < 1.5.0 because that fixed some errors:
( http://github.com/jeffkreeftmeijer/nifty-generators/commit/fa208807b1926c4777c61bca295bcecfbeac7baf ) - thoughtbot-shoulda (2.10.2)
Comments
-
It would be a very appreciated feature (at least by myself) if the nifty_scaffold generator could create a controller in a namespace.
Things to add:- namespace name:: before controller name in controller declaration and in spec files
- replace @object with [:namespace, @object] in link_to stuff
- create directories for namespaces in controllers, views, spec (?)
What do you think ?
Comments
The nifty_scaffold generator should be able to handle namespaced objects of all types. Currently if you try something like
./script/generate nifty_scaffold Admin::User name:stringyou'll get errors as it tries to generate a migration with a slash in it.$ ./script/generate nifty_scaffold Admin::User name:string exists app/models create app/models/admin/user.rb exists db/migrate create db/migrate/20090824145311_create_admin/users.rb No such file or directory - db/migrate/20090824145311_create_admin/users.rbI stuck a
gsub('/','_')where it generates the name of the migration, but then I still got several more places in which the namespace was improperly used. Most center around aborting if the namespace dir doesn't exist and not generating the correct number of '../' when requiring spec_helper.If I get the chance I'll see if I can fork and make all the changes necessary to support scaffolding namespaced objects.
meskyanichi
Wed Sep 23 13:59:46 -0700 2009
| link
I came across this issue (or well, maybe not an issue). Building a small web application for a client and want a back-end to separate admin logic from the public logic. I wouldn't like to think of new method names in my "PagesController" like an admin_index and such. Instead, I'd rather have a Admin::PagesController and put all admin logic inside there.
Would be nice to see support for nested routes in this awesome generators gem. :)
-
See Markus Arike's fork for an example on how to add respond_to blocks for supporting XML and RSS/atom feeds.
Comments
-
There are quite a few nifty generators and it really fills up the generator listing. This also discourages me from adding more.
Instead maybe there could be a single
niftygenerator which the first argument is the specific generator to use. For example:script/generate nifty scaffold item name:string
If no generator is specified it could list them all with a short description.
$ script/generate nifty scaffold - ... layout - ... authentication - ...
Comments
-
From a GitHub message:
Add a
--remarkableoption to support the Remarkable library.See fork here: http://github.com/jtadeulopes/nifty-generators/tree/master
Comments
-
In line 32 of file
rails_generators/nifty_scaffold/USAGE, using the word 'affect', instead of 'effect', might be more appropriate.Comments
-
generate factory instead of fixtures when using --shoulda option
0 comments Created about 1 month ago by wnnWell, I would like to have a feature to generate factory for the model to be generated instead of fixtures when using --shoulda option.
Has this been done in any forks of this nifty-generator?
If yes, link might be helpful for me.Comments
-
There should be a
--formtasticoption one could pass in nifty_scaffold or nifty_authentication which would use the simplified formtastic methods to generate form fields.Comments
-
Support Rails built in i18n system for easy translations
0 comments Created about 1 month ago by ronnqvistIt'd be nice it the generated views could be readily modified to use Rail's build in i18n system, so that all the phrases would be found in an en.yml file which could easily be translated into other languages. This feature could of course be a non-default option.
Comments
-
The login.html.haml template still(?) uses :login instead of :username. Obviously this breaks login since the user-model has no :login attribute. (I guess most people don't use --haml with nifty_authentication?)
Comments












Were you ever able to solve this issue? I know the tests could use some improving.
Nope, I've never solved it.
I know the tests in general can use a lot of work. I would like to get cucumber setup to run the generators and then run the tests that the generators create (I believe Dr. Nic came up with this solution). Someday soon hopefully.
Strange, I checked again (on my macbook) and the tests seem to work now. I'll check if it has anything to do with the versions of the gems I'm using. Stay tuned :)
Ok, got it working.
It only works with shoulda <= v2.0.6
That's about all I can tell you...