search for: friendly_id

Displaying 10 results from an estimated 10 matches for "friendly_id".

Did you mean: friend_id
2009 Oct 05
4
Friendly_id and Rake problem.
Hello there, The plugin friendly_id (http://github.com/norman/friendly_id) has rake tasks that you can call. I''m using this plugin as a gem. I''m trying this: rake friendly_id:make_slugs MODEL=Post and it is rising this error: Don''t know how to build task ''friendly_id:make_slugs'' So the...
2009 Feb 19
0
friendly_id / acts_as_referenced conflict?
Hi, I''m using acts_as_referenced to generate unique references: # property.rb class Property < ActiveRecord::Base acts_as_referenced :referenced_column => "permalink" end I would now like to use friendly_id to create seo friendly URLs instead of using the id. I now have: # property.rb class Property < ActiveRecord::Base acts_as_referenced :referenced_column => "permalink" has_friendly_id :permalink, :use_slug => true end The above code generates a "slug text is blank"...
2011 Aug 04
3
#create tests fail when I add FriendlyId to my model
I am doing controller testing, and I can''t seem to get the create method 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 `cre...
2009 Dec 03
2
Dynamic Paths
...in the muck of a major rails project, and need a bit of advice. Google isn''t much help in this case, so I came here. I''m trying to set up a URL structure as follows: url.com/username/blog/post_id where the user has_many posts and the post belongs_to user. I''m using the friendly_id plugin to enable easy lookup with the user''s username, and I would like to have the blog paths automatically retrieved, instead of getting a path error (as such): ActionView::TemplateError (post_url failed to generate from {:controller=>"posts", :user_id=>#<Post id: 1,...
2011 Mar 19
5
Routing issue
Hi! I have two models, artists and songs. I have this in my route file: resources :artists, :path => "ackord" do resources :songs end Which gives me urls like this (I''m using https://github.com/norman/friendly_id to create and manage slugs): example.com/ackord/artistname/songs/songname-id Now I want to remove the /songs part to get a url like this: example.com/ackord/artistname/songname-id Is it possible? I have tried to do it with match without success. Any ideas? Best Regards Linus -- You received t...
2011 Nov 21
1
uninitialized constant Sass::Script::Functions::EvaluationContext
...uot; config.gem "role_model" config.gem "formtastic", :version => "~> 0.9.10" config.gem ''searchlogic'', :version => ''~> 2.4.27'' config.gem "haml", :version => ">=3.0.0" config.gem "friendly_id" config.gem "will_paginate" config.gem ''sanitize'' config.gem "paperclip" config.gem ''fastercsv'' config.gem ''validates_email_format_of'' config.middleware.use "Sass::Plugin::Rack" with rails 2.3.8....
2013 Mar 20
2
Problem With Unicorn
Hello All, I deployed my application in the local server and i''m using unicorn and nginx. I tried to run ''bundle exec unicorn_rails'' but it is showing ''ERROR: Gem bundler is not installed, run `gem install bundler` first.''. even if I run gem install bundler the bundler getting installed, But it is showing the same error again i.e. Gem bundler is not
2009 Apr 18
1
RESTful Routing: Getting names of resources out of paths
...id=1 GET example.com/1/edit -> edit, id=1 GET example.com/new -> new Etc. In addition, I''d like to nest another resource beneath that (there''s a has_many relationship), so that I can get routes like: example.com/1/3 example.com/1/3/edit Etc. I''m planning on using friendly_id to change the IDs and make the URLs more memorable, but before I introduce that I just want to get those resource names out of there. I want to remain as restful as possible, but I''m not sure how to get this using map.resources. Ideas? Thanks, Chris -- Posted via http://www.ruby-forum.c...
2012 Apr 27
1
Can't mass-assign protected attributes even if I use attr_accessible
...no working solution :-( I use attr_accessible to avoid MassAssignent errors and it works for all others models but not for the "Author" name attribute. Here is the Author model : class Author < ActiveRecord::Base attr_accessible :name, :email extend FriendlyId friendly_id :name, use: :slugged # some validations has_many :posts #authlogic acts_as_authentic # some stuffs end Actually, I have disabled whitelist_attributes and it solved my problem but I suppose that is not the convenient way to do this (and probably not a good idea)...
2010 Dec 08
1
Help on install act_as_ferret on windows XP
....1.2) bundler (1.0.3, 1.0.0.rc.6) capybara (0.3.9) configuration (1.1.0) cucumber (0.8.5) cucumber-rails (0.3.2) culerity (0.2.12, 0.2.10) database_cleaner (0.5.2) datanoise-actionwebservice (2.3.2) diff-lcs (1.1.2) erubis (2.6.6) factory_girl (1.3.2) ferret (0.11.5 mswin32) ffi (0.6.3 x86-mingw32) friendly_id (3.0.6) gemcutter (0.6.1) geokit (1.5.0) gherkin (2.1.5 i386-mingw32) heroku (1.9.13) hobo (1.0.1) hobofields (1.0.1) hobosupport (1.0.1) hoe (2.6.1) i18n (0.4.2) json_pure (1.4.6, 1.4.5) launchy (0.3.7) mail (2.2.9) mime-types (1.16) mysql (2.8.1 x86-mingw32) nokogiri (1.4.3.1 x86-mingw32) pg (0.9...