But this shouldn't work because the method session is undefined for 
yourextension_extension.rb.

That's the error I get when I try to do what you said:
in `activate': undefined method `session' for SolrTags:Module 
(NoMethodError)

But I'm using radiant 6.0.4 so could be this. How could I get the method 
session for my _extension.rb file?


Marc


Erik van Oosten wrote:
> You can enable sessions for a particular extension by doing something 
> like this:
>
> class YourExtension < Radiant::Extension
>   def activate
>     YourController.class_eval { session :disabled => false }
>   end
> end
>
> This works on Radiant 6.0.3. I found this on the mailing list. I do not 
> think this is documented.
>
> Regards,
>     Erik.
>
>
>
> Jeff Dean wrote:
>   
>> I believe that this is because of a bug in rails, and not radiant.   
>> The SiteController has session :off, and adding session :on in your  
>> controllers doesn't seem to do anything.
>>
>> The only way I know to change this is to actually go into  
>> SiteController and comment out that line.  I've seen posts about  
>> putting things like:
>>
>> SiteController.class_eval{session :on}
>>
>> in the activate method of your extension, but that didn't work for me.
>>
>> To get it to work, I did froze to edge radiant, then went into  
>> SiteController.rb and commented out the session line.  This would mean  
>> that any pages that you want sessions off for you'd have to do  
>> manually - so use with caution.
>>
>> Jeff
>>
>>   
>>     
>
>   

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to