similar to: Routing Error No route matches "/employee/list" with {:method=>:get}

Displaying 20 results from an estimated 11000 matches similar to: "Routing Error No route matches "/employee/list" with {:method=>:get}"

2012 Dec 03
2
Stop User from Changing URL
I have an authentication and autherization system built on the same lines outlined by Michael Hartl, rails tutorial. Here is the employees_controller.rb: class EmployeesController < ApplicationController before_filter :signed_in_employee, only: [:index, :edit, :update] before_filter :correct_employee, only: [:edit, :update] etc etc
2006 Mar 24
6
login forms , redirect_to and ajax-scaffold problems
Hi, I have a standard type authentication technique direct from AWDWR, so there is a before_filter :authorize_employee, :except => :login in my employees_controller.rb the authorize_employee is in application.rb def authorize_employee unless session[:employee_id] flash[:notice] = "Please log in" # save the URL the user requested so we can hop
2005 Dec 26
16
How to create application with single table with primary key
I''m trying without any succes to create application in which I have one keyed table. The table structure is: CREATE TABLE employees ( pin INTEGER PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL ); Whenever I enter new record, I need the the filed pin is also filled by user. Whenever a user edit the table, there should be option to edit or not edit the
2005 Dec 22
7
Ruby on Rails and lookup tables
Hi, I''m a newbie on both Ruby and Ruby on Rails, and I''m struggling with my first app. I have a table with a column called "employee_id" which is a foreing key associating it with the "employees" table. I have populated both tables. When I run "ruby script/generate scaffold <model name> <controller>" it generates a web page with all
2008 Jun 23
12
From Instant Rails 2.0 to Rails 2.1.0
hi, I have installed Instant Rails 2.0 on my machine which comes with Rails 2.0.2. Now I want to update my Rails to version 2.1.0. So I do gem update rails and It seems to be fine. But when I check the version of my Rails I get the following message: >rails -v C:/RoR/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `report_activate_error'': RubyGem version error: activesupport(2.0.2 not
2006 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates has broken in some calls to render_component from views. I might be missing something but as far as I remember Rails updates is the only thing I''ve done in between. See the log: *** START LOG SNIPPET Start rendering component ({:params=> {:center_id=>10, :id=>25},
2005 Dec 17
2
Subfolders in Rails applications (newbie)
After about a week playing with Rails, I have built a couple of apps but am still unable to get one thing to work: subfolders. (I am probably using the wrong term here, but oh well...) I would like my rails application to have controllers logically grouped into folders. So for instance: http://domain.com/accounting/accounts http://domain.com/hr/employees Here''s how I have tried to
2006 May 20
3
In a find, can''t you use both :include and :limit ?
I''m trying to do a find that includes a join. It has to be a find because I''m using the results for a Pagination, so I need to limit my query to the number of results I want to display per page. Here''s the type of thing I want to do: Employee table <-> Skills_Employees table <-> Skills table Let''s say I want to find all the employees who have
2005 Jul 07
3
NameError Exception
Ruby/Rails n00b here so go easy on me... I''ve been wracking my brain trying to figure out what is wrong here. I''ve checked all my models for the appropriate belongs_to, has_many, etc. I''ve checked to make sure I''m using singular and plurals in the right spot. I''ve checked my syntax around all my "within"''s and nothing seems to fix
2007 Oct 16
3
Controller iterating through returned records and appending to each
I have a controller that gets a list of employees (which has an "include => [:salaries, :incentives, :billablegoals, :reviews]"). I then need it to iterate through each employee and determine their current active goal based on the "effective date." After playing around with it a bunch, I got the following to work. Only problem is that if I remove the "@employees.each {
2006 Jul 07
6
mongrel/win32/apache2 link modification question.
I have apache2 - mongrel 0.3.13.3-mswin32 running, on a server 2000 pc, by folowing the ''Serving Multiple Rails Applications on Windows with Apache and Mongrel'' ( http://tinyurl.com/z9ftz ) the question I have is why is why is http://localhost/myapp/ addded to the front of all my links and how can I stop it? origanal link using webrick /employees/edit/1214 now
2008 Oct 25
2
Update action | NoMethodError | nil.to_sym
Ok, totally no reason why I''m getting an error in this model update and no other. HELP! CONTROLLER: # GET /employees/1/edit def edit @employee = Employees.find(params[:id]) end VIEW: <h1>Edit Employee</h1> <div id="main-sub"> <%= error_messages_for :employees %> <% form_for(@employee) do |f| %> <table width="600"
2006 Apr 26
2
two layers of has_many
Hi, There are many companies. Each company has many departments. Each department has many employees. The following find_by_sql method seems awful. What is the best way to get all the employees of a company? class Company < ActiveRecord::Base has_many :departments def employees Employee.find_by_sql("SELECT employees.* FROM companies, departments, employees
2006 Aug 01
2
HOWTO? security based on data values
Hi! I recently started with RoR and this may be a newbie question. I have a company table, employee table and transactions table. 1 company has many employees. Each employee performs many transactions. Employees from different companies LOGIN to the system to record their transactions. Employees can search on all transactions associated to their companies (indirect relationship via employee),
2006 Mar 28
2
Fastest way of adding " " around multiline text in RADRAILS
lets say i have the following SQL in my database editor : When i paste it into rad rails i have to add quotes and the ''+'' symbol to the end of each line. It is very tedious. What is the best method? select timesheets.employee, sum(items.hours) as hours, sum(items.hours*timesheets.cost) as cost, sum(items.hours*timesheets.charge*decode(activities.chargetype,0,1,0)) as charge,
2009 Aug 28
2
No route matches "/%20questions/showans/1" with {:method=>:g
Hi i face this problem when i submit the information while evaluating the a new page in a already done scaffold...........the new page is "showans"......i write the link_to tag like this " <%= link_to ''Submit'', :controller => " questions", :action => "showans", :id => @question.id %>" -- Posted via
2006 Mar 28
2
In_place_editor_field throws error ...
I receive the following error: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id when trying to use the in_place_editor_field tag: <% for employee in @employees %> <%= in_place_editor_field :employee, employee.fname %> <% end %> My model is called Employee and is being populated from a controller method employees_list:
2006 Mar 29
3
partial variable help
Can''t work this out: In list.rhtml: <% for employee in @employees -%> <%= render(:partial => "list_form", :object => employee) %> <% end -%> In _list_form.rhtml (partial): <%= employee.id %> In controller: @employees = Employee.find(:all) I get the following error: undefined local variable or method `employee'' I everything is correct
2006 Apr 21
2
accessing to a table (model)
i don''t know how to access to the collecction of data that exists in other model. for example i generate two scaffold : company and employe both have a controller, a model and 5 files in the views: _form.rhtml, list.rhtml, new.rhtml, edit.rhtml and show.rhtml the views are working very well, but each access just one table: company or employe my problem is any simple, but i
2007 Jul 26
1
Bi-directional self-referential HABTM
Hi, I''m having a little trouble figuring out how to make a self- referential HABTM bi-directional. I have a Employee class. Each employee can have a couple of bosses, who are also employees. The employee class has the following HABTM: has_and_belongs_to_many :bosses, :class_name => "Employee", :join_table => "bosses_courses", :association_foreign_key =>