SHARE
TWEET

Untitled

a guest May 31st, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Engine < ApplicationRecord
  2.   belongs_to :brand
  3.   belongs_to :series
  4.   mount_uploaders :images, EngineImageUploader
  5.   validates :name, :article, :catalog_number, :content, :title, :description, :weight, :power_output, :price, :displacement, :model, :producer, :images, presence:true
  6.  
  7.   extend FriendlyId
  8.   friendly_id :permalink, use: :slugged
  9.  
  10.   def should_generate_new_friendly_id?
  11.     permalink
  12.   end
  13. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top