Displaying 2 results from an estimated 2 matches for "profiles_controller".
Did you mean:
profile_controller
2006 Aug 10
2
Authentication: UserEngine or own creation?
...o many calls to the DB. And it only has controller/action pairs
that it can validate, so I don''t think that it fits my needs.
I rather thought about creating my own system, that does not validate
controller/action pairs, but "real" roles and permissions.
Semantic code:
class profiles_controller < ApplicationController
def edit
if user.has_right ''EDIT_PROFILES'' or user.belongs_to ''ADMINS''
# do edit stuff
else
render :partial => ''permission_error''
end
end
end
What do you think about that? Do I miss some...
2008 Jun 06
0
in_place_editor_field in Rails 2.0.2
...g to get an in_place_editor_field working in my index
view. I have the following:
index.html.erb
<% for profile in @profiles %>
<% div_for(profile) do %>
<% @profile = profile %>
<%= in_place_editor_field(:profile, :first_name) %>
<% end %>
<% end %>
profiles_controller.rb
def index
@profiles = Profile.find(:all)
respond_to do |format|
format.html
end
end
At one point I read something about including the following line in
the controller:
in_place_edit_for :profile, :first_name
However, that line doesn''t do much as far as I can tell. When I...