Got the problem solved.

It was due to initializers not being applied in production mode!, the
default_options passed to tiny_mce_helper were nil.

Copied <engine_path>/engine_config/initializers/mce_options.rb to
RAILS_ROOT/config/initializers/

This solved the problem.

It seems all the initializers may be skipped in production mode.

Does anybody faces the same problem?

If yes then, is this a bug or a feature introduced(by rails 2.2 or someone)?

We should get this documented if all face the same problem.

Thanks,
Sachin

On Sat, Apr 4, 2009 at 9:18 AM, Sachin <[email protected]> wrote:

>
> Hi,
> I have controller in my app which has the same line for declaring
> tiny_mce as in controllers of CE.
> class SiteController < BaseController
>  uses_tiny_mce(:options => AppConfig.default_mce_options,:only
> => :create_news)
>
> In development mode I get a tiny_mce with default options for my app
> controllers, but in production mode the tiny_mce loads with simple
> options.
>
> This is seen only for the controllers belonging to my app. CE
> controllers don't have such issue.
>
> The difference between production and development is that I cache all
> scripts
> In script_and_styles :
>  = javascript_include_tag "prototype", "rounder", "effects","event-
> selectors","controls","glider","dragdrop","prototip-
> min","application",:cache => "cache    /all",:plugin =>
> "community_engine"
>
> I don't know exact reason from where tiny_mce is picking up different
> options for controllers of CE and controllers for my app in production
> mode.
>
> Is there something missing I have to do to get tiny_mce working with
> default options for my controllers in production mode?
>
> I am using - C.E for 2.2 on rails 2.2.2
>
> Please help.
>
> Thanks,
> Sachin
> >
>


-- 
Sachin Kale

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to