Displaying 13 results from an estimated 13 matches for "reservedword".
Did you mean:
reservedwords
2006 May 04
9
Help: wrong number of arguments (0 for 1)
Is it my environment? Is something wrong, cause I thought this should
just work?
I have a simple table and I created a model and a controller:
ruby script/generate controller Restaurant
ruby script/generate model Restaurant
I edited the controller to this:
class RestaurantController < ApplicationController
scaffold :Restaurant
end
I run it and:
http://0.0.0.0:3000/Restaurant works fine,
2008 Nov 06
10
Rails 2.1.2 bug in include on has_many?
In my continued efforts to port my rails 1.x app to Rails 2.1.2, I keep
running into what appear to be ActiveRecord bugs.
I am using an :include on a :has_many definition:
class Request < ActiveRecord::Base
has_many :service_types, :order=>''service_types.id ASC'',
:include=>:service_response
[...]
There''s no reason this wouldn''t be supported in
2006 Feb 19
4
is "display" a reserved name of some sort?
A view display.rhtml sees no controller state variables set in the
corresponding display action. Why?
-- fxn
2006 Feb 25
0
''requests'' is a bad table name
...ests
- Param/params
- Cookie/cookies
- Response/responses
- Session/sessions (watch out you conference management coders ;-)
- Header/headers
I couldn''t find any hints about reserved model names in the Rails book, but
only now found this wiki page:
http://wiki.rubyonrails.com/rails/pages/ReservedWords
Hope that helps others from struggling - and please correct if I am wrong
Thanks
Thomas
2006 Oct 20
0
Reserved words
Is there a more definitive list of reserved words
in Rails than the one at
http://wiki.rubyonrails.org/rails/pages/ReservedWords ?
While it''s nice to read war stories of Wiki users running into
these issues, it might be nicer to get a canonical,
using-these-variable-names-is-asking-for-trouble list from the
developers.
As an example, I had a model "Build" (as in a
software build) in my app that didn'...
2008 Feb 17
3
"URL" model not possible?
Hello there,
I just added an URL model to my app (allowing users to basically add
urls etc), which works perfectly fine on the console, but the views
are not working properly. I always get the following error (e.g. when
wanting to create/add a new url):
ActionView::TemplateError (undefined method `rewrite'' for #<Url:
0x25a6070>) on line #5 of urls/new.html.erb:
2:
3: <%=
2005 Dec 21
1
Table called applications - causes stack overflow?
Having worked through Four Days on Rails and the book Agile Web Development
with Rails I decided it was time to start a live project. I have an existing
application with MySQL database, so I modified the schema to use Rails
standard column names. The main table was named ''applications''.
ruby script/generate scaffold Application Admin results a stack overflow
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"
2013 Jul 19
12
Rails 4 "belongs_to: record" association doesn't work
Hi,
I discovered a weird behavior when using a "belongs_to: record" association
in Rails 4.
Given two models A and B:
class A < ActiveRecord::Base
belongs_to :record, class_name: ''B'', foreign_key: ''b_id''
end
class B < ActiveRecord::Base
end
When creating A, it inserts a record in B and returns A with id of nil:
irb(main):001:0>
2009 Aug 27
8
Adding New Column
I added a new column using a migration. Once I updated the
new.html.erb, edit.html.erb, show.html.erb, and the index.html.erb I
brought up my web pages. There was a field to update show. I tried the
update and the it was successful but the update did not show up in any
of the other pages. What did I miss? I am using 2.3.3 of ror.
2009 Nov 30
6
rails 2.2.3 dirty.rb field_changed? method throwing arg error on creating an obj
I have a new model I''ve just built. It''s associated with another model
via has_many. I''m trying to create one of these obj''s for the first
time and I keep getting an Argument Error as follows:
ArgumentError (wrong number of arguments (3 for 0)):
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/
active_record/dirty.rb:135:in `field_changed?''
2006 May 06
0
RE: Rails Digest, Vol 20, Issue 156
...blem while trying to create a controller with an
> > action called send.
> >
> > So rename your database column "open" into something like "is_open"
> >
> > A list of Reserved Words is findable here:
> > http://wiki.rubyonrails.com/rails/pages/ReservedWords
> >
> > On 5/4/06, Donald Brady <dbrady010@mac.com> wrote:
> >> class RestaurantController < ApplicationController
> >> Showing
> >> "update#{@scaffold_suffix}") %>
> >> usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/act...
2007 Aug 14
4
Import of Access data via RODBC changes column name ("NO" to "Expr1014") and the content of the column
Dear all,
I have some problems with importing data from an Access data base via
RODBC to R. The data base contains several tables, which all are
imported consecutively. One table has a column with column name "NO". If
I run the code attached on the bottom of the mail I get no complain, but
the column name (name of the respective vector of the data.frame) is
"Expr1014" instead