Image will not save with Paperclip and Rails 4 -


i'm trying use paperclip uploading image has many , belongs relationship 'pictures'

i'm imagemagick etc, correctly installed, because i've more image uploaders in project works, difference 1 has has many relation.

i'm not getting 'saving attachment' in console. idea ignored strong parameters.

in topicscontroller:

params.require(:topic).permit(:id, :title, :content, :active, pictures_attributes: [:image, :id, :_destroy] ) 

in topic model:

has_many :pictures, dependent: :destroy accepts_nested_attributes_for :pictures, allow_destroy: true validates :title, :content, presence: true 

in picture model:

belongs_to :topic  has_attached_file :image, :styles => { :medium => "400x400#", :thumb => "200x200#", :small => "50x50#" }, :default_url => actioncontroller::base.helpers.asset_path('missing.png') 

i know there many other topics this, rails 3 , different in way of setting 'attr_accessible'

with version 3.5.0 of paperclip, fine rails 4.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -