hii

i am initial level of rspec.i have no idea that how to test paginate
method in rspec

My controller code is

@sort = params[:sort] ? params[:sort] : "users.created_at"
    @by = params[:by] ? params[:by] : "ASC"

@users = User.paginate(:select => "users.id, users.login,
users.first_name, users.last_name,
users.email,users.activation_code,role_relations.role_id,
role_relations.customer_id, roles.name AS role_name", :joins => "LEFT
JOIN role_relations ON role_relations.user_id = users.id LEFT JOIN roles
ON roles.id = role_relations.role_id", :conditions =>
["role_relations.customer_id = #{params[:customer_id]}"], :order =>
@sort+" "+...@by, :page => params[:page], :per_page => session[:per_page])

i have searched on google but I could not find the solution

Please anyone post the solution of this problem

-- 
Posted via http://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.

Reply via email to