Skip to content

Commit

Permalink
testing modules now
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Apr 1, 2011
1 parent 483300d commit 94bd1a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions app/models/site_feature.rb
Expand Up @@ -5,7 +5,6 @@ class SiteFeature < DomainModel
serialize :options

validates_presence_of :name, :feature_type
validate :test_xml

belongs_to :admin_user, :class_name => 'EndUser', :foreign_key => :admin_user_id

Expand All @@ -19,7 +18,7 @@ class SiteFeature < DomainModel

before_save :update_image_paths

def test_xml
validate do
if self.validate_xml
validator = Util::HtmlValidator.new(self.body)
self.errors.add(:body," is not valid XML and has one or more errors:\n " + validator.errors.join(",\n ")) unless validator.valid?
Expand Down
@@ -1,10 +1,10 @@
<% admin_form_for :profile, @profile_entry, :html => { :onsubmit => "ProfileData.editProfile(); return false;", :id => "profiles" } do |f| -%>
<%= admin_form_for :profile, @profile_entry, :html => { :onsubmit => "ProfileData.editProfile(); return false;", :id => "profiles" } do |f| -%>
<%= hidden_field_tag "profile_type_id", @profile_entry.user_profile_type_id %>
<%= f.check_boxes :published, [["allow other users to see this profile", true]], :single => true %>
<% if @profile_entry.content_model -%>
<% cms_subfields_for :entry, @profile_entry.content_model_entry do |sf| -%>
<%= cms_subfields_for :entry, @profile_entry.content_model_entry do |sf| -%>
<%= @profile_entry.user_profile_type.content_model.edit_form(sf,:except => @profile_entry.user_profile_type.content_model_field_id) %>
<% end -%>
<%= f.submit_tag @profile_entry.content_model_entry.id ? 'Update' : 'Create' %>
Expand Down

0 comments on commit 94bd1a9

Please sign in to comment.