Guest User

Untitled

a guest
Feb 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. class Group < ActiveRecord::Base
  2. require 'ftools'
  3. cattr_accessor :update_sql
  4.  
  5. @@update_sql = "
  6. SELECT
  7. groupID as id,
  8. categoryID as category_id,
  9. groupName as name,
  10. description as description,
  11. graphicID as graphic_id,
  12. useBasePrice as use_baseprice,
  13. allowManufacture as allow_manufacture,
  14. allowRecycler as allow_recycler,
  15. anchored as anchored,
  16. anchorable as anchorable
  17. published as published
  18. "
  19.  
  20. def desc
  21. RedCloth::new(self.description).to_html
  22. end
  23.  
  24. def to_param
  25. "#{id}-#{name.gsub(/[^a-z0-9]+/i, '-').downcase}"
  26. end
  27.  
  28. end
  29. ~
  30. ~
Add Comment
Please, Sign In to add comment