disregard that message i missed the pictures.

On Thu, May 21, 2009 at 10:57 AM, Kenny Ortmann <[email protected]>wrote:

> Did you have any questions here or were you just giving an example of what
> you are doing?
>
>
> On Thu, May 21, 2009 at 9:49 AM, JannaB <[email protected]> wrote:
>
>>
>> I am using AuthLogic and ActiveScaffold together in a Rails App.
>> Essentailly, through AuthLogic (using Railscast 167 tutorial) I create
>> a username/password signon screen, which has a link in the upper right
>> to allow one to Register should they not presently posses a username/
>> password. Very straightforward. If they click to Register, it takes
>> then to associate/edit/.
>>
>> Here is how my associate/edit/id looks
>>
>> http://www.parametricplanet.com/edit0.JPG
>>
>> note that this is rendered from erb's in the views/associate
>> directory, inside of  /views/layouts/application.html.erb.
>>
>> Note that I am using Active Scaffold.
>> Here is how it looks when displayed from within the edit functionality
>> of active_scaffold:
>>
>> http://www.parametricplanet.com/edit.JPG
>>
>> Notice that the  "Register | Login" and copyright notice are
>> incorporated into the inner edit form, because of  /views/layouts/
>> application.html.erb. How can  I set things up so that the inner form,
>> for editing or creating a record, does not do this?
>>
>> here is my associate_controller.rb :
>>
>> class AssociateController < ApplicationController
>> layout "application.html.erb"
>>
>>  active_scaffold :associate do |config|
>>      config.label = "Associates"
>>      config.list.columns  =
>> [:lastname, :firstname, :username, :email, :branch]
>>      #list.columns.exclude :comments
>>      config.columns[:state].form_ui = :usa_state
>>      config.columns[:country].form_ui = :country
>>      list.sorting = {:lastname => 'ASC'}
>>      config.actions.exclude :show #, :delete
>>      config.actions.swap :search, :live_search
>>
>>    end
>>
>>        def new
>>            @associate = Associate.new
>>          end
>>
>>          def create
>>            @associate = Associate.new(params[:associate])
>>            if @associate.save
>>              flash[:notice] = "Registration successful."
>>              redirect_to root_url
>>            else
>>              render :action => 'new'
>>            end
>>          end
>>
>>          def edit
>>            @associate = Associate.find(params[:id])#current_associate
>>          end
>>
>>          def update
>>            @associate = Associate.find(params[:id])#current_associate
>>            if @associate.update_attributes(params[:associate])
>>              flash[:notice] = "Successfully updated profile."
>>              redirect_to root_url
>>            else
>>              render :action => 'edit'
>>            end
>>          end
>> end
>>
>> here is my /views/layouts/application.html.erb :
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
>> //<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>> // <head>
>> //    <%= javascript_include_tag :defaults %>
>> //    <%= active_scaffold_includes %>
>> //    <title><%= h(yield(:title) || @page_title ||"Untitled") %></
>> title>
>> //    <%= stylesheet_link_tag 'application' %>
>> //    <%= yield(:head) %>
>> //  </head>
>> //  <body>
>> //    <div id="container">
>> //      <div id="user_nav">
>> //        <% if current_associate %>
>> //          <%= link_to "Edit Profile", edit_associate_path(:current)
>> %> |
>> //          <%= link_to "Logout", logout_path %>
>> //        <% else %>
>> //          <%= link_to "Register", :controller =>
>> "associate", :action => "new" %> |
>> //          <%= link_to "Login", login_path %>
>> //        <% end %>
>> //      </div>
>>
>> //      <% flash.each do |name, msg| %>
>> //        <%= content_tag :div, msg, :id => "flash_#{name}" %>
>> //      <% end %>
>>
>>
>> //      <% if show_title? %>
>> //        <h1><%=h yield(:title) %></h1>
>> //      <% end %>
>>
>>
>> //      <%= yield %>/
>> //    </div>
>> //    <p>Copyright © 2009/</p>
>> //  </body>
>> //</html>
>>  >
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to