Skip to content

Instantly share code, notes, and snippets.

@bborn
bborn / mceoptions.rb
Created October 23, 2009 15:46
put this in your initializers directory
# getting nil.merge errors in production when overriding a controller in CE?
AppConfig ||= OpenStruct.new
AppConfig.default_mce_options = {
:theme => 'advanced',
:browsers => %w{msie gecko safari},
:theme_advanced_layout_manager => "SimpleLayout",
:theme_advanced_statusbar_location => "bottom",
:theme_advanced_toolbar_location => "top",
:theme_advanced_toolbar_align => "left",
#models/my_thing.rb
class MyThing < ActiveRecord::Base
belongs_to :user
acts_as_activity :user
end
#views/activities/_unhandled_item.html.haml
- case activity.item_type
- when 'MyThing'
="created a MyThing: #{link_to(activity.item.name, user_my_thing_path(activity.item.user, activity.item))}"