I am new to dragonfly and trying to get through the settings on the main documentation page for rails. Do not use active recording.
My steps:
1) add to gemfile
gem 'dragonfly', "~>1.0.3"
2) bundle install
3) rails g dragonfly
initializers /dragonfly.rb created
4) model
class Post
include Mongoid::Document
dragonfly_accessor :image
field :title, type: String
field :body, type: String
end
5) controller
params.require(:post).permit(:title, :body, :image)
Just by launching mongod and rails s, I get the undefined method error 'dragonfly_accessor'
Any ideas what I am missing?
source
share