search for: project_control

Displaying 7 results from an estimated 7 matches for "project_control".

2006 Apr 23
5
Controllers in folders and helper scope in Rails >1.0
...my problem. I tried to google it, read the release-docs and haven''t found anything similar. My application uses folders to store controllers, as described in the Rails book. I need to have same-named controllers for admin and for users, so it looks like this: /app/controllers/admin/project_controller.rb /app/controllers/admin/... /app/controllers/project_controller.rb /app/controllers/... The controller-classes are properly scoped like this: /app/controllers/admin/project_controller.rb has: class Admin::ProjectController < ApplicationController layout "admin" def...
2006 Jul 05
1
List of projects
...nd creates a new project.he''lll get the list of projects in the same page. till here i got working. Here is my question:: i want the list such that a drop down list will be there, and if i select a month i should get the list of projects done in the month. I used this code in the project_controller.rb def list @january = Project.find(:all,:conditions=>"created_at >= 01-01-06 and created_at <= 31-01-06") end is that correct? or could any body will tell me how to start? -Harish -- Posted via http://www.ruby-forum.com/.
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
...devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/base.rb:721:in `new'' c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/base.rb:721:in `create'' C:/devlopment_tools/projects/codex1/active/bugtrigger/app/controllers/project_controller.rb:128:in `create_notice'' The code is: --Notice Model class Notice < ActiveRecord::Base has_many :graphics end --Project Controller def create_notice @notice = Notice.create(params[:notice]) end --Form <%= form.file_field(:graphic) %> --Graphic class G...
2009 Sep 10
2
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch
...pment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/ lib/ active_record/base.rb:721:in `new'' c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/ lib/ active_record/base.rb:721:in `create'' C:/devlopment_tools/projects/codex1/active/bugtrigger/app/controllers/ project_controller.rb:128:in `create_notice'' The code is: --Notice Model class Notice < ActiveRecord::Base has_many :graphics end --Project Controller def create_notice @notice = Notice.create(params[:notice]) end --Form <%= form.file_field(:graphic) %> --Graphic class Graphic &...
2006 Jul 03
0
Multiple File Upload
Hello together, I developed a file upload in my application like this (files uploaded belong to a project): project_controller.rb: ---------------------- def upload_attachment project = Project.find(@params[:id]) begin project.attachments.create(params[:attachment]) rescue flash[:attachment_error] = "Error at Upload" end redirect_to :action => "edit_project", :id => project end attach...
2006 Aug 01
3
paginate, search, sort with ajax problem
.... found this great tutorial at http://dev.nozav.org/rails_ajax_table.html. got it working except for one thing. I can''t seem to make the pagination work. The link_to_remote defined in the helper is pointing to the wrong url. I have set up things like so: defined a search method in de project_controller located in apps/admin/project. In de tutorial the method is called list. defined in the item_controller I copy and paste the helper methodes to project_helper in the folder helpers/admin/project_helper The files that create the view are located in views/admin/project Problem is that the he...
2005 Dec 16
3
Help with error
...-1.13.2/lib/active_record/ base.rb:1501:in `method_missing'' ./script/../config/../app/controllers/admin_controller.rb:65:in `add_to_project'' The following code: application.rb -------------- private def get_project session[:project_in_progress] ||= Project.new end project_controller.rb --------------------- def new_general @project = get_project @general = GeneralItem.new @general_tab = "current" end # Get the current Project session and # add the current Object to it def add_to_project @project = get_project @project.find(params[:id])...