Created
July 12, 2011 16:34
-
-
Save juliend2/1078368 to your computer and use it in GitHub Desktop.
review model
This file contains hidden or 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 Review < ActiveRecord::Base | |
# ... some other code here ... | |
def self.form_fields | |
[ | |
{:name=>:journalist_name,:type=>:text_field}, | |
{:name=>:publication,:type=>:text_field}, | |
{:name=>:city,:type=>:text_field}, | |
{:name=>:title_en,:type=>:text_field}, | |
{:name=>:title_fr,:type=>:text_field}, | |
{:name=>:short_subtitle_en,:type=>:text_field}, | |
{:name=>:short_subtitle_fr,:type=>:text_field}, | |
{:name=>:full_subtitle_en,:type=>:text_field}, | |
{:name=>:full_subtitle_fr,:type=>:text_field}, | |
{:name=>:quote_en,:type=>:rich_text_area}, | |
{:name=>:quote_fr,:type=>:rich_text_area}, | |
{:name=>:excerpt_en,:type=>:rich_text_area}, | |
{:name=>:excerpt_fr,:type=>:rich_text_area}, | |
{:name=>:long_version_en,:type=>:rich_text_area}, | |
{:name=>:long_version_fr,:type=>:rich_text_area}, | |
{:name=>:acclaim_date,:type=>:date_field,:label=>"Review date"}, | |
{:name=>:audio_set_id, :type=>:select, :options=>AudioSet.all.collect{|a| [a.title, a.id] }+['']}, | |
{:name=>:is_featured, :type=>:check_box}, | |
{:name=>:featured_image, :type=>:image_file_field,:label=>"Feature image"}, | |
{:name=>:feature_doc, :type=>:normal_file_field} | |
] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment