SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question using session variable in plugin

    I'm trying to use a session variable in FCKEditor. The plugin controller lives in vendor. What I'm trying to do is use the session[:username] as the upload path, so everyone can have their own stash of images. FCK will never be available if the session isn't available, so I'm not so worried about that (yet).

    I've tried just straight calling the session[:username] within the controller - I get the error when starting up the server:
    Code:
    ...
    Exiting
    ./script/../config/../vendor/plugins/fckeditor/app/controllers/fckeditor_controller.rb:6:in `[]': Symbol as array index (TypeError)
    ...
    I've tried setting a constant in the application controller (I've also tried the session and post controller) and I get the error when starting up the server:
    Code:
    ...
    Exiting
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:477:in `const_missing': uninitialized constant FckeditorController::USERFOLDERNAME (NameError)
            from ./script/../config/../vendor/plugins/fckeditor/app/controllers/fckeditor_controller.rb:5
    ...
    I have no idea what I'm doing... obviously... I'm totally lost and confused about the process of the server startup. It kind of makes sense because the session isn't there for the plugin on startup (I think?) but I don't know how else to go about this.

    Thanks soooo much for any help!!!

  2. #2
    SitePoint Member
    Join Date
    Aug 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bump?

    nothing?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •