On Nov 28, 8:23 am, Petan Cert <[EMAIL PROTECTED]>
wrote:
> Frederick Cheung wrote:
> > Is your entries association funny in any way ?
> > Fred
>
> Hi Fred,
> thanks. I have users and entries controller. In my show controller
> (mydomain.com/profile/:username), I am using <% for entry in
> @user.entries %> to show user posts. I dont know, if it is funny in any
> way or not. :).
That's not what I meant. What I meant was does it have any interesting
options on it that might confuse will paginate ?
Fred
>
> USERSCONTROLLER:
> def show
> @entry = Entry.new
> username = params[:username]
> @user = User.find_by_username(username)
> @entries = @user.entries.paginate :per_page => 3, :page =>
> params[:page], :order => 'created_at DESC'
> .
> .
> .
> end
>
> ENTRIESCONTROLLER:
> def show
> @entry = Entry.find_by_id_and_user_id(params[:id], params[:user_id],
> :include => [:user, [:comments => :user]])
> end
>
> THX
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---