Answer the question
In order to leave comments, you need to log in
Rails 4. Undefined_method 'image_geometry' error in paperclip?
Good afternoon,
I came across a situation where it is necessary to transfer a photo to the form for cropping, but it gives an error: undefined_method 'image_geometry'
There are two tables company and company_services - the relationship between them has_many - belongs_to.
Controller:
def create
@company_service = CompanyService.new(company_service_params)
if @company_service.save
if params[:company_service][:image].blank?
redirect_to current_company
else
redirect_to crop_company_service_path(@company_service)
end
end
end
<%= form_for :company_services do |f| %>
<%= f.cropbox :image, :width => 400 %>
<%= f.crop_preview :image, :width => 130 %>
<%= f.submit 'Save' %>
<% end %>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question