Displaying 2 results from an estimated 2 matches for "brands_control".
2011 Aug 04
3
#create tests fail when I add FriendlyId to my model
...d test to pass when friendly_id is added to the mix. If I comment
it out of the model, the tests all pass perfectly. The moment I add it
back in, the error looks like this:
1) Error:
test_create_valid(BrandsControllerTest):
FriendlyId::BlankError: FriendlyId::BlankError
app/controllers/brands_controller.rb:16:in `create''
test/functional/brands_controller_test.rb:27:in `test_create_valid''
Here''s the relevant line in brand.rb:
has_friendly_id :name, :use_slug => true, :approximate_ascii => true
Here''s the test (using mocha):
def test_create...
2009 Feb 20
1
RESTful Routes not working - Switches ID and Action
....rb
map.resources :brands
The application also doesn''t seem to update and create brands, which
seems to come from the same problem. I pretty much copy and pasted the
model from other ones, so my guess is, that I forgot something basic.
I got:
models/brand.rb
views/brands/...
controllers/brands_controller.rb
Thanks very much!
Steffen
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-...