search for: projectscontroller

Displaying 20 results from an estimated 21 matches for "projectscontroller".

2009 Mar 17
4
Preventing a submitted hash from ActiveRecord DB store
...ant to prevent a task from being saved to the DB if it is empty ie. if there is no i/p for that task from the user. I tried the following class Task < ActiveRecord::Base before_save :check_if_empty ... def check_if_empty self.destroy if description.blank? end but i get this TypeError in ProjectsController#create can''t modify frozen hash Is there a way to let ActiveRecord know not to save a record (which is a frozen hash in this case) to the DB? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails...
2012 Feb 17
5
undefined method `key?' for nil:NilClass PaperClip
...<%= f.text_area :description %><br /> <%= f.label :image, "Imagem" %> <%= f.file_field :image %><br /> <%= f.submit "Criar novo Projeto" %> <% end %> But when I go to my action, this errors show. NoMethodError in ProjectsController#new undefined method `key?'' for nil:NilClass Rails.root: /home/felipe/rails/Younner Application Trace | Framework Trace | Full Trace Request Parameters: None Show session dump Show env dump Response Headers: None Thank you. -- Posted via http://www.ruby-forum.com/. -- You rec...
2007 Dec 04
7
REST bug with form_for
Hi all, I am running on Windows XP sp2 with ruby 1.8.6, and rails 1.2.3 I am using REST, and have this in my view <% form_for(:project, :url => project_path(:user_id => @project.my_user, :id => @project), :html => {:method => :put}) do |f| %> The browser correctly gives <form method="post" action="/users/2/projects/1">
2007 Aug 10
1
ActionMailer and Dreamhost
...ntication => :login, } ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.perform_deliveries = true ActionMailer::Base.default_charset = ''utf-8'' When looking at the log, I do see that the email is generated. Here is the error message: Errno::ENOENT in ProjectsController#create No such file or directory - /usr/sbin/sendmail -i -t RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/ base.rb:572:in `popen'' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/li...
2006 Jan 12
2
Web services and login?
Has anyone managed to do this? I thought about using sessions but they dont want to work for me... Here''s what I''m doing as a little test: class NotLoggedIn < Exception end class ProjectsController < ApplicationController wsdl_service_name ''Projects'' web_service_api ProjectsApi def Login @session[:loggedIn] = true end def GetProjects if @session[:loggedIn] return Project.find(:all) else raise NotLoggedIn, "You are not logged in!" end...
2006 Jan 17
4
find_by_sql column ordering defect?
...ASC'') for m in @model if m.modelonly == false columns << m.column_name end end sqlstatement = "select id, " + columns.join('', '') + " from projects" @objs = Project.find_by_sql(sqlstatement) the breakpointer tells me that: irb(#<ProjectsController:0x2aaaacb3aa80>):001:0> sqlstatement => "select name, begin_date, projected_end_date, actual_end_date from projects" which is the correct order for the sqlstatement. I then extecute the @objs = Project.find_by_sql(sqlstatement) statement. The ordering of the columns has been a...
2006 Mar 18
2
Need help with my view populating rows
...and I''ve been trying to do it on my own. I''m uploading pictures to my Pictures table. As you know, I need a few fields for each picture. I''ll need the filename, content-type, comment, id, and foreign key referencing the project it is in. This is my controller. class ProjectsController < ApplicationController before_filter :login_required, :except => [ :list, :index ] def index end def new @project = Project.new @picture = Picture.new end def create @project = Project.new(params[:project]) if @project.save then (params[:pictures] || []...
2008 Nov 12
2
redirecting to a different controller from a search box
...") do %> <label for ="q">Enter search phrase: </label> <%= text_field_tag "q", params[:q] %> <input type ="submit" value="Go" /> <% end %> The error I get is: ActiveRecord::RecordNotFound in ProjectsController#show Couldn''t find Project with ID=search How do I override the default route for this, so it doesn''t think search is an id? http://localhost:3000/projects/search?q=foo ? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are s...
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
any suggestions on why I am gaining this error. ActiveRecord::StatementInvalid in ProjectsController#create Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , , )'' at line 1: INSERT INTO projects (`name`, `date_created`, `quote_id`, `client_id`, `description`, `user_id`)...
2011 Nov 24
2
This is not the error: ActionView::MissingTemplate
Hey everyone, I am getting the following error: Started POST "/rubyamf/gateway" for 127.0.0.1 at 2011-11-24 16:27:20 +1300 Processing by RubyamfController#gateway as */* Processing by ProjectsController#templates as */* ←[1m←[36mProject Load (1.0ms)←[0m ←[1mSELECT `projects`.* FROM `projects` ←[0 m Completed 200 OK in 34ms (Views: 3.0ms | ActiveRecord: 28.0ms) Completed 500 Internal Server Error in 267ms ActionView::MissingTemplate (Missing template rubyamf/gateway with {:handlers=>[ :erb...
2013 May 27
3
Ransack, acts-as-taggable-on and checkboxes in search form
...ext_field :budjet_lteq - @tags.each do |tag| = check_box_tag(''q[tags_id_eq_all][]'', tag.id) = tag.name That''s what i have in console after submiting the form (so i have no tags query at all, even though i checked two checkboxes): Processing by ProjectsController#index as HTML Parameters: {"utf8"=>"✓", "q"=>{"category_id_eq_any"=>["1"], "budjet_gteq"=>"100000", "budjet_lteq"=>"70000000"}} Any help will be appreciated. -- You received this messa...
2007 Mar 17
10
a WARNING about cruise task or user-specified build task for Rails
If (like me) you use ccrb to test a Rails app and (like me) you define your own :cruise task, because, for example, you use rspec rather than Test::Unit and (like me) you have the RAILS_ENV ||= ''production'' line in environment.rb (because, like me, you use crummy shared hosting) Your build will run in production mode, possibly screwing up your production database,
2006 Oct 18
1
observe_field, GET method and RESTful controllers
...d("project_selector", :update => "project_selector_div", :url => project_path, :method => :get, :with => "''id=''+escape(value)") %> Then the index action is called and Mongrel shows the following wierdness in the log file Processing ProjectsController#index (for 127.0.0.1 at 2006-10-18 23:29:13) [GET] Session ID: cd6a0a059f38a78c07376123512967e1 Parameters: {"action"=>"index", "id"=>"3", "controller"=>"projects", "_"=>nil} [4;36;1mProject Load (0.000000)...
2006 Dec 27
0
HABTM Checkboxes - Adding/Updating Users to a Project
...id][] <%= check_box_tag project[user_id][]''.... When I try to make any updates to a projects assigned user list (in this example I''m removing user_id 3 from the project) I get the following error --------------------------------------------------------------- NoMethodError in ProjectsController#update --------------------------------------------------------------- undefined method ''user_id='' for #<Project:0x224b564> --------------------------------------------------------------- Request --------------------------------------------------------------- Parameters: {...
2006 Nov 04
4
how to get observe_field to use GET method?
Hi All. I am trying to set-up observe_field so that it uses the GET method (To work with a RESTful controller). <%= link_to_remote("Test", :update => "main", :url => { :controller => "projects", :action => "show", :id => "3"}, :method => "get" ) %> <%= observe_field("project_selector", :update
2006 Mar 04
13
file_column
Restricting size of an uploaded file, is how is that possible? If I do not want a user to upload a file larger than X bytes, can it easily be done? If I also would like restrict the types of files that can be uploaded, how may I do so? Thank you, Sharkie
2008 Mar 14
15
Am I off track on my testing?
Is it just me or does anyone else miss being able to create something quickly. Once you start writing all the tests your time is now increased by a factor of 10. I agree with the logic in testing, but am I doing something wrong? Take the simple example of a controller test for an index action that shows all the forum posts for a user account. The controller code would be something like what is
2008 May 13
0
Problem geting web interface to work
...file "C:/Server/cruisedata/projects/myproject/builder.lock" exists. Any help is highly appreciated... Thank you, Thomas -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger -------------- next part -------------- Processing ProjectsController#index (for 127.0.0.1 at 2008-05-13 16:25:00) [GET] Parameters: {"format"=>"js", "action"=>"index", "controller"=>"projects"} Rendering projects/index_js ActionView::TemplateError (Invalid argument - C:/Server/cruisedata/projec...
2012 Sep 23
6
Missing template projects/index, application/index ?
Getting this issue...even though I have my views there in both the projects and application. Also getting a routes issue "No route matches [GET] "/projects" when going to projects when I have root :to => "projects#index" defined in my routes file. Any idea? 1) Creating Projects can create a project Failure/Error: visit ''/''
2009 Mar 17
11
Refactoring module
Dear all Please see the following module, In module SX3 SX4 and SX5 have similar class Tasklist, but inherit from different class. I will use the following code to connect to different data sources RemoteSX3Model.establish_connection sx3_hash RemoteSX4Model.establish_connection sx4_hash RemoteSX5Model.establish_connection sx5_hash How can I refactor my code in module to look simpler? Thank you