Hi I'm trying to upgrade a site from using hobo 0.5.3 to version 0.7.5
and I can't figure out how auto_actions :all is working in my
controller.
Previously the default view generated by hobo got me a list of all the
users in my users table, nicely paginated, with links to editing the
user, and all the items in the dependent tables. I could write my own
users index page with all these features, but would rather figure out
the "Hobo way".
* So basically I'm trying to get a list of every user, with links to
edit or remove that user
-------------------------------------------------------
Here's my controller code in version 0.5.3
-------------------------------------------------------
class UsersController < ApplicationController
hobo_model_controller
before_filter :verify_credentials
end
--------------------------------------------------------
Here's my controller code in version 0.7.5
-------------------------------------------------------
class UsersController < ApplicationController
hobo_user_controller
auto_actions :all #I've added auto_actions all because without it I
get "No action responded to index" errors
before_filter :verify_credentials
end
--------------------------------------------------------------------
Here's the relevant parts of my model code in 0.5.3
--------------------------------------------------------------------
class User < ActiveRecord::Base
hobo_model
include Hobo::AuthenticatedUser
set_login_attr :username
set_search_columns "username"
alias_attribute :display_name, :username
has_many :practice_sessions
has_many :contact_info
has_many :permission
--------------------------------------------------------------------
Here's the relevant parts of my model code in 0.7.5
--------------------------------------------------------------------
class User < ActiveRecord::Base
hobo_user_model # Don't put anything above this
fields do
username :string, :login => true, :name => true
administrator :boolean, :default => false
timestamps
end
#include Hobo::AuthenticatedUser
#set_login_attr :username
#set_search_columns "username"
alias_attribute :display_name, :username
has_many :practice_sessions
has_many :contact_info
has_many :permission
--------------------------------------------------------------------------------------------------------------------------
FYI there is no view code under ~/app/views/users/ in my 0.5.3 version
or my 0.7.5 version
--------------------------------------------------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---