search for: project_pages

Displaying 9 results from an estimated 9 matches for "project_pages".

Did you mean: product_pages
2006 Mar 29
1
2 ajax related questions
Hi! I''ve got list of project on the main page and some content. If user clicks on one of the project i use ajax to update div with content with project data. I''m displaying only one project at a time. In index action i just collect all projects: @projects = Project.find(:all, :order => "date DESC") In show action i render project partial: render :partial =>
2006 Mar 31
4
Question about pagination
Hi! I''ve got a list of project on the main page and if one of them is selected i render a partial using ajax with data of selected project. How to create links to next/previous project using pagination? -- Posted via http://www.ruby-forum.com/.
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code: @project_pages, @projects= paginate :project, :per_page => 10, :conditions => ["account_id = ?", account] ?! If only I could pass the sub-collection account = ... @projects = account.project to paginate, instead of letting it extract it with a find :all + sql conditions A...
2006 Jun 27
1
find (ordering by field in related table)
Hi, I am using the rails find command as below @project_pages, @projects = paginate :projects, :per_page => 20, :conditions => "clients.organisation_id = " + params[''search''][''organisation_id''], :joins => ''inner join clients ON clients.id = projects.client_id'' There seems to be a probl...
2006 Jul 05
3
list of users
Hi all, I''m creating admin module. in that module i need to get the list of users and also the projects created by the each user. No doubt i''m getting the list of users. but i''m not getting the list of projects done by each user.. This is my code:: <% for user in @users %> <%=link_to
2006 Mar 18
2
Need help with my view populating rows
...if @project.save then (params[:pictures] || []).each { |pictureParam| @project.pictures.create(pictureParam) } @project.pictures.create(params[:picture]) if params[:picture] end render :action => ''new'' end def list @project_pages, @projects = paginate(:projects, :order => "date ASC", :per_page => 5) end end In ''new.rhtml'' I have this. <%= start_form_tag :action => ''create'' %> <p>Project Name</p> <%= text_field :project, :name %>&lt...
2006 Apr 28
2
outputing table data
Hi, Just come across thi sproblem, and jsut cant find out what is wrong with it, if any one has any suggestions it would be good. in my projects_controller.rb I have def list @project_pages, @projects = paginate :projects, :per_page => 10 end and ths list.rhtml file I have <table> <tr> <th>Name</th> <th>Actions</th> </tr> <% if @projects %> <% for project in @projects %> <tr>...
2005 Aug 18
10
Scaffolding, DRY and RHTML
Hello all, I''m working on a couple of Rails projects at the moment and have noticed something that seems to go against the DRY principal. Why, when scaffolding, are individual CRUD rhtml files created instead of using one as a partial and having the others use that single partial? This especially applies to the list rhtml. I am about to get to the other operations and see how feasible
2006 Dec 24
8
HABTM Reading Rows From Two Tables
...ss Project < ActiveRecord::Base has_and_belongs_to_many :users end class User < ActiveRecord::Base has_and_belongs_to_many :projects end -------------------------- CONTROLLER -------------------------- # Projects_Controller # I have the generic scaffold running my list view def list @project_pages, @projects = paginate :projects, :per_page => 10 end # list.rhtml # I just want to be able to pull the projects and users that belong to the project into a view. # Some projects may have 3 or 4 users. # so I have this <% for project in @projects %> <%= project.title %><br>...