I followed the steps to get friendly_id working in the rails engine - which are posted here on github and it seems that when I do the following:
s.add_dependency 'friendly_id', '~> 5.0.0'
in the engine.gemspec file and then do:
bundle install #=> works
rails g friendly_id #=> works
rake db:migrate
I get:
rake aborted!
uninitialized constant FriendlyId
Um .... What?
module Xaaron
class Role < ActiveRecord::Base
extend FriendlyId
friendly_id :role, use: :slugged
validates :role, presence: true
validates_uniqueness_of :role
end
end
You may need to explicitly require FriendlyId from your engine (docs):
require 'friendly_id'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With