Every repository with this icon (
Every repository with this icon (
| Description: | Rails: A Rails scaffold generator that generates DRYer, cleaner, and more useful code. edit |
-
Contact José regarding the InheritedResources-issue:
1) ActionController::RoutingError: parrot_url failed to generate from {:controller=>"parrots", :id=>#, :action=>"show"}, expected: {:controller=>"parrots", :action=>"show"}, diff: {:id=>#}
(eval):16:inparrot_url' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/url_helpers.rb:194:inresource_url' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/base_helpers.rb:311:insend' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/base_helpers.rb:311:inparse_redirect_url' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/base.rb:79:increate' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/respond_to.rb:301:incall' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/respond_to.rb:301:inrespond_any' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/respond_to.rb:233:inrespond_to' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/base_helpers.rb:283:inrespond_to_with_dual_blocks' /opt/local/lib/ruby/gems/1.8/gems/josevalim-inherited_resources-0.7.3/lib/inherited_resources/base.rb:78:increate'haml (2.0.9) rails/./lib/sass/plugin/rails.rb:19:in `process' /test/functional/donkeys_controller_test.rb:8:in `test_create'test 'create' do
Donkey.any_instance.expects(:save).returns(true) @donkey = donkeys(:basic) post :create, :donkey => @donkey.attributes # <<<<<<<<<<<<< donkeys_controller_test.rb:8 assert_response :redirectend
2) test_destroy_with_failure(DonkeysControllerTest) [/test/functional/donkeys_controller_test.rb:45]:
expected to not be nil.
test 'destroy with failure' do
Donkey.any_instance.expects(:destroy).returns(false) @donkey = donkeys(:basic) delete :destroy, :id => @donkey.to_param assert_not_nil flash[:error] # <<<<<<<<<<<<< donkeys_controller_test.rb:45 assert_response :redirectend
Comments
-
Come up with a smooth way to disable an option that is true by default, i.e. negative toggle.
Comments
-
Write even better functional tests for REST-actions. Goal: Killer-tests, i.e. "best practice"-tests. Suggestion: Routing, formats, ...
Comments
-
It looks like mocha is a dependancy - that's not clear in the docs
1 comment Created about 1 month ago by darronError:
Went away when I installed mocha:
sudo gem install mocha
Not sure if it's an issue with just my machine, but caused a bit of grief.
Comments
-
config/scaffold.yml doesn't seem to be honoring...
1 comment Created about 1 month ago by darronmy:
resourceful: false
shoulda: trueI've done this a couple times today to make sure - here's a gist:
If I pass it on the command line - it works just fine:
./script/generate dry_scaffold Zebra name:string about:text --skip-resourceful --shoulda
I may be doing something wrong - but I just want to:
create a rails app
add dry_scaffold
add a simple model/controller with your scaffold generator
have the basic tests passAnd I can't seem to be able to do that - like I said, I may be doing something wrong, but am not sure what.
Comments
I get a similar problem with controller test. In the scaffold.yaml I have
dry_scaffold:
args:actions: index,show,new,edit,create,update,destroy formats: html,jsoptions:
formtastic: true resourceful: true pagination: true layout: false views: true helpers: true tests: true controller_tests: true test_unit: false shoulda: false rspec: true fixtures: false fgirl: true machinist: false object_daddy: falsedry_model:
options:migration: true timestamps: true tests: true test_unit: false shoulda: false rspec: true fixtures: false fgirl: true machinist: false object_daddy: falsebut helper test and controller test are created for test-unit
if I use the command line option --rspec then the specs are generated properly.
-
Use collection_path, resource_path, etc. unless skipping inherited_resources.
Also, perhaps use the longer method for creating the form tag...- semantic_form_for resource, :url => edit_resource_path(resource) do |form|This will allow belongs_to/polymorphic controllers without any updates to the views.
Comments
-
There is no support of namespaces
Comments
-
When generating a new scaffold the routes are not updated. I don't know if this is the intentional behaviour or not...
Comments












#2 fixed!