Switch branches/tags
Nothing to show
Commits on Dec 20, 2011
  1. Add themes/site-1

    rwdaigle committed Dec 20, 2011
  2. Exclude db dump from git

    rwdaigle committed Dec 20, 2011
Commits on Mar 15, 2009
  1. multisite: Fix broken article versions

    Spyridon Vasileiadis authored and emk committed Mar 15, 2009
    [This is an edited version of the author's blog post at -Eric]
    Currently in mephisto edge, article versions are broken. More precisely,
    the bug comes up ONLY when the installation operates in multisite mode
    (or even more precisely, when there are at least two articles belonging
    to two different sites).
    The problem is how acts_as_versioned is being used. An acts_as_versioned
    record has among others an “id” column (the default id that ActiveRecord
    requires) and a “version” column.
    Currently Mephisto falsely does the following inside
    \app\controllers\admin\articles_controller.rb on line 38 (edit
      @version = params[:version] ? @article.versions.find(params[:version]) : @article or raise(ActiveRecord::RecordNotFound)
    the whole problem is the find(params[:version]) . What happens here is,
    that we lookup an article’s version by searching for its id instead of
    for its version column (even though we do use the correct :version
    So this has to change to find_by_version(params[:version]) and thus
      @version = params[:version] ? @article.versions.find_by_version(params[:version]) : @article or raise(ActiveRecord::RecordNotFound)
    Notice though that this doesn’t break in a single-site installation,
    because in this case id and version bot get the same (concurrent)
    increment. That is because all articles belong the same one and only
    Site instance.
  2. Fix tainted string error when updating comment

    davec authored and emk committed Mar 6, 2009
    When updating a comment, a tainted string error was being thrown due to
    the lack of a h() escape on the article title in the comment partial.
    A deprecation warning from truncate() in the comment partial has also
    been resolved.
    A functional test (test_should_update_comment) for the admin comments
    controller is also included.
  3. Expire cache on theme change from admin/settings

    davec authored and emk committed Mar 3, 2009
    Force cache expiration when changing the theme from the Admin::Settings
    controller as is done when changing the theme from the Admin::Themes
    controller so that the behavior after a change of theme is consistent,
    regardless of where the change is made.
  4. Mods for subdir deployment

    davec authored and emk committed Mar 1, 2009
    Changes required for deployment to a subdirectory:
    1. CSS URL paths should be relative, not absolute
    2. ActionController::AbstractRequest.relative_url_root is
       ActionController::Base.relative_url_root in Rails 2.2
  5. Pass comment approval status to the template

    davec authored and emk committed Feb 27, 2009
    By passing the comment's approval setting to the __thanks_for_comment
    template, the template can provide additional feedback such as "Your
    comment is awaiting moderator approval", "Sorry, we threw your comment
    away", or similar if the comment was not automatically approved.  For
    example, __thanks_for_comment.liquid could look like the following:
      Thanks for the comment.
      {% unless approved %}It is awaiting moderation.{% endunless %}
  6. Force consistent ordering of dates containing NULLs

    davec authored and emk committed Feb 27, 2009
    Because database servers differ on how they sort NULL values, the sort
    order for articles was changed, via COALESCE, so that a NULL date will
    be treated as being less than (i.e., older than) any non-NULL date.
    This fixes test_should_search_article_by_section so that it passes with
    MySQL, SQLite, and PostgreSQL.
    [I'm merging this patch because I'm quite fond of PostgreSQL, and
    because it has been tested with most of the other databases we support.
    If this breaks your database, please let me know. -Eric]
  7. Don't depend on database ordering for asset tests

    davec authored and emk committed Feb 27, 2009
    test_should_edit_asset and test_should_update_asset were depending on
    database-specific ordering of the newly added assets. Although these
    tests worked with MySQL, they failed with PostgreSQL because an
    unordered find does not necessarily return the first of the three
    uploaded assets.
    Instead, Asset.find was changed to Asset.find_by_filename to
    specifically return the desired asset file. Asset.find_by_filename is
    used instead of Asset.find(:order => :id) so that there is no dependence
    on the order in which the three versions of the asset file are added.
  8. Fix the parameter logging filtering...

    webmat authored and emk committed Mar 12, 2009
    Call filter_parameter_logging only once with all sensitive field names, rather than once per field to protect.
  9. Avoid CoreImage failure on attachment_fu uploads

    danlynn authored and emk committed Mar 3, 2009
    This initializer avoids failures wen uploading images via attachment_fu
    when there is no external image library to use other than CoreImage.
    This works by removing "CoreImage" from the list of default processors
    that attachment_fu iterates over. This avoidance is only required when
    the rails process is ran under a forked process such as that which
    occurs with apache + Passenger + CoreImage under OSX since the Core
    Image APIs are not safe to call from a forked process and will fail. A
    helpful message is written to the production.log during startup to
    indicate that image resizing and thumbnailing will not be performed
    unless one of the other image libs is available.
Commits on Mar 12, 2009
  1. Fix Asset.addInput function to work with latest version of prototype

    isaackearse committed Mar 12, 2009
    When adding another file I also clear the file input because there is no reason to upload the same file again.
Commits on Feb 9, 2009
  1. filtered_column_code_macro: Word-wrap comment

    emk committed Feb 9, 2009
    I'm trying to keep comments below 80 columns in new code, so I don't
    have to resize my Emacs window.
  2. filtered_column_code_macro: Default to 'rake test'

    emk committed Feb 9, 2009
    In general, Rails applications seem to reserve a bare rake command for
    running 'rake test'.  So I'm going ahead and making that the default
    here, for better or for worse.
  3. Add default codemacro stylesheets for theme usage.

    danlynn committed Feb 9, 2009
    Updated main README with instructions on how to 
    link to these stylesheets.  A codemacro Rakefile 
    was added with tasks to test the plugin and 
    generate a new default_coderay.css stylesheet.  
    The codemacro plugin now wraps all code listings 
    in a <div> enabling horizontal scrolling and 
    dynamic width.
Commits on Feb 2, 2009
  1. Fix display of theme homepage links

    emk committed Feb 2, 2009
    Many thanks to Gustavo Sales (aka vatsu) for pointing out this bug and
    proposing a fix:
    In order to minimize code duplication in the *.erb files, I've rewritten
    this code as a helper method.
  2. Require test gems in development environment, not test

    emk committed Feb 2, 2009
    After experimenting a bit, this looks like a simpler approach.  It
    allows developers to run:
      rake gems:install
    ...and it allows users to run:
      export RAILS_ENV=production
      rake gems:install
    Thank you to mat for his work on this!
Commits on Jan 30, 2009
  1. missing tainted string in cache listing

    Sean O'Brien
    Sean O'Brien committed Jan 30, 2009
Commits on Jan 19, 2009
  1. Fixed typo.

    mat committed Jan 19, 2009
Commits on Jan 13, 2009
  1. Added some brackets

    james2m authored and emk committed Dec 20, 2008
  2. escaped link in _page.html.erb

    james2m authored and emk committed Jan 12, 2009
    Signed-off-by: James McCarthy <>
Commits on Jan 9, 2009
  1. Changed user login to send user to admin section on succesful login i…

    Chris Cummer authored and emk committed Jan 4, 2009
    …nstead of the blog homepage since users have the ability to post to the blog
Commits on Dec 31, 2008
  1. Fixes 'attempted to output tainted string' error when rendering email…

    Chris Cummer authored and emk committed Dec 30, 2008
    … address for mailto
Commits on Dec 27, 2008
  1. Allow newer versions of these gems

    emk committed Dec 27, 2008
    There's no reason to lock these to specific versions.
  2. Add version numbers to config.gem statements

    emk committed Dec 27, 2008
    Let's just go ahead and require the minimum version of each gem that we
    actually know works.  We also split out the test-specific gems into
    their own section.