Displaying 3 results from an estimated 3 matches for "profilescontrol".
2007 May 10
5
Pagination has many through problems
I have searched for days for an example that demonstrates what i would
like to do, and this morning i thought i''d worked it out, but
no....here''s what i have:
Controller
==========
class ProfilesController < ApplicationController
def friends
current_user.profile.friends
end
def list_friends
@profile_pages, @profiles = paginate( friends, :per_page => 10)
end
end
Models
======
class Profile < ActiveRecord::Base
has_many :friendships
has_many :friends,
:through =>...
2012 Mar 05
1
Twitter like route
...39;'].include?(request.session[:token])
end
end
get "/:token" => "profiles#public", :as => :public_profile,
:constraints => PublicProfileConstraint
Here is the log:
Started GET "/gregory" for 127.0.0.1 at 2012-03-05 12:44:43 -0800
Processing by ProfilesController#public as HTML
Parameters: {"token"=>"gregory"}
Lawyer Load (0.2ms) SELECT "users".* FROM "lawyers" WHERE
"users"."id" = ? LIMIT 1 [["id", 1]]
Lawyer Load (0.3ms) SELECT "users".* FROM "lawyers"...
2008 Dec 09
4
HABTM checkboxes insert but don't delete
I have a problem related with the HABTM relationships with checkboxes.
I''ve got a profile and a service model, both related with
has_and_belongs_to_many.
The problem is that i can insert new data in the profiles_services
table, however, i cant delete already existing data.
What could be the problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message