Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Group < ActiveRecord::Base
- require 'ftools'
- cattr_accessor :update_sql
- @@update_sql = "
- SELECT
- groupID as id,
- categoryID as category_id,
- groupName as name,
- description as description,
- graphicID as graphic_id,
- useBasePrice as use_baseprice,
- allowManufacture as allow_manufacture,
- allowRecycler as allow_recycler,
- anchored as anchored,
- anchorable as anchorable
- published as published
- "
- def desc
- RedCloth::new(self.description).to_html
- end
- def to_param
- "#{id}-#{name.gsub(/[^a-z0-9]+/i, '-').downcase}"
- end
- end
- ~
- ~
Add Comment
Please, Sign In to add comment