Created
November 27, 2008 18:00
-
-
Save flexd/29830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
~ | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment