I’m missing something obvious about extensions and authentication
I setup an extension hoping to be able to process forms from the
of the site.
using Mental Branch
run ruby script\generate extension mailertest
define_routes do |map|
map.connect ‘mailertest/:action’, :controller => ‘mailertest’
in mailertest controller add method to make sure the new controller is
logger.info(“if I’m not back in 5 minutes, wait longer”)
where I’m promptly redirected to the /admin/ login screen.
Redirected to http://localhost:3000/admin/login
Filter chain halted as
@filter=:authenticate>] returned false.
Filter chain halted as [:authenticate] did not yield.
I’m missing something obvious aren’t I? Is there a way to specify that
extension shouldn’t require authentication?
Actually, maybe I’m on the wrong track all together - I want to be able
process forms submitted from the public side of the site. I don’t need
tags that will create the forms and inputs. Perhaps, easier if I add a
in routes.rb to /mailertest and put the controller alongside Radiant
Any insight appreciated!
Add “no_login_required” after the class declaration.
Quoting Todd McGrath [email protected]:
Thanks for this, I had already given-up on the possibility of an
extension doing anything other than packaging-up an admin interface
for functionality which would have to happen through Radius tags. As
it is this is much more powerful, especially if I can figure-out how
to flow the output of my views into a Radiant layout.
However, when I apply the technique you describe I still get sent to
the login screen. What am I doing wrong in-order to bypass the admin
login requirement. Here is my Radiant::Extension class declaration
including the “no_login_required” flag:
class StaffListingExtension < Radiant::Extension
description “An extension for a staff listing”
define_routes do |map|
# map.connect ‘admin/staff_listing/:action’, :controller => ‘staff’
map.connect ‘directory/:action’, :controller => ‘staff’
# admin.tabs.add “Staff Listing”, “/admin/staff_listing”, :after
=> “Layouts”, :visibility => [:all]
# admin.tabs.remove “Staff Listing”
Looking back, I wasn’t very clear. I was too busy laughing for sending
to myself. Should have said “add it to your controller”; i.e.
class TellafriendController < ApplicationController
render :update do |page|
page.replace_html(“target”, “Mail sent”)
:startcolor => “#88ff88”,
:endcolor => “#114411”
As you can see, I just want to be able to respond to AJAX requests.
Based on your post, you need to add “no_login_required” to your
Hope this helps and please post back to the list your experiences with
Quoting Loren J. [email protected]: