Displaying 20 results from an estimated 80 matches similar to: "Using render inside a FormBuilder (EdgeRails)"
2007 Sep 30
2
Outputing to the browser, how?
Hello,
I''m writting some helper methods to write forms, so I have this working code:
class TableFormBuilder < ActionView::Helpers::FormBuilder
["file_field", "password_field", "text_field"].each do |name|
define_method(name) do |label, *args|
@template.content_tag(:tr,
@template.content_tag(:td,
@template.content_tag(:label,
2006 May 31
5
undefined method `redirect_to''
Hi all
I have followed this tute:
http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger
to get rails running and all is fine except for getting:
undefined method `redirect_to''
when I load my test page.
I have the following in my xx.rhtml:
<%= select :group, :user_id, find_all_groups, {}, {:onclick =>
select_group, :size => find_all_groups.size + 1}
2007 Mar 21
3
Install and Run mysql 4.x
You know, I suppose I could simply install the tarball, I've
successfully installed mysql in the past that way. However, I thought
I'd use yum, install the redhat/CentOS way, and I am amazed how hard
it is to get this thing working. I admit to not having become all
that familiar with mysql.
Anyway, when I run
# mysql_install_db --user=mysql
I get a bunch of errors:
070321
2006 Jun 05
3
ActiveRecord validations and FormBuilder
Hi,
I''m writing my own FormBuilder and I wanted to put an asterisk or
something next to any required fields. The Builder has access to the
AR object, is there any method I can call on the AR object that will
tell me whether or not a particular field is required? Failing that,
can I access the complete list of validations so I can look through
it for instances of
2006 Apr 06
0
FormBuilder-friendly labels?
I''m trying to find a good way to emit <label> tags inside a form_for()
block, without needing to repeat the name of the instance variable
constantly. Is there a better way to do this than the snippet below,
or do I need to do a little extension to the FormBuilder itself?
<% form_for :long_example_name, @long_example_name,
:url => { :action => :new } do
2005 Dec 27
2
Rewriting FormBuilder
Hi,
I want to extend formbuilder to make it output a lable (I know about
labeled_form_helper made by technoweenie), my own formating, and a
couple of extra tags inside the form attribute. I was easily able to
extend form_remote_to. But when I continue to adjust the way elements
are handled I don''t know how to continue. I can''t find the method
text_field thats should is
2007 Aug 20
0
FormBuilder in rjs
I have a page, which renders a partial that contains a ''State'' drop
down list. Upon change, it re-renders the ''City'' drop down, re-
populating it based on selected state_id:
Page: /customer/new.rhtml
<% form_for :customer, :url => customers_path do |f| %>
State: <%= f.collection_select :state_id, State.find(:all), ''id'',
2006 Mar 02
0
EdgeRails with_scope and :select
>From what i can gather the with_scope feature doesn''t allow you to
specify which columns get selected. It appears to default to "*". So
if i specify something like:
Question.with_scope( :find => {
:from => "questions q, answers a",
:conditions => "q.owner = a.owner AND a.owner=1"
}) do
...
end
I''ll generate SQL like:
SELECT *
2006 Mar 07
0
Storing sessions files elsewhere on EdgeRails
Hi all,
In a Rails 1.0 project, I successfully changed the sessions storage
location to <RAILS-ROOT>/tmp, by adding
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:tmpdir =>
File.join(RAILS_ROOT, ''/tmp''))
in environment.rb
Problem:
--------
I tried to use the same trick in an EdgeRails project, but it doesn''t
work : server error, with no
2006 Mar 10
0
Session management changed in EdgeRails?
Hi,
I''ve been developing an application in Rails 1.0 and finally made the
switch to Edge for has_many :through and polymorphism. I''m currently
storing the authenticated user object (User model) in the session. This
has worked well up until upgrading to EdgeRails. What I do is set @user
= session[:user] in my controllers and then access the various @user
associations such as
2005 Dec 18
2
EdgeRails with other Gems like RMagick
I am using EdgeRails, and have some of the plugin''s using gems such as
Rmagick which are included through a command similar to "require_gems
''rmagick''".
Curious how to handle such attempts at inclusion when I am no longer bound
to the system gems and am using the code strictly within vendor/rails and
such.
Is there a way to point require_gems to another
2005 Oct 12
0
SCGI + edgerails
I can''t get SCGI to work with edge rails. Is the runner designed to
work with edge rails?
Thanks!
Kyle Maxwell
2006 Aug 02
4
RadRails and EdgeRails
Anyone know how to setup EdgeRails with RadRails ?
Stuart
2006 Dec 19
1
Internal API errors in EdgeRails
Started getting these in my development.log when I called a bad
before_filter. Looks like log_error needs to be updated?
DEPRECATION WARNING: @response is deprecated! Call response.inspect
instead of @response.inspect. Args: [] See http://www.rubyonrails
.org/deprecation for details. (called from log_error at
./script/../config/../vendor/rails/actionpack/lib/action_controller/rescue.rb:
66)
2006 Mar 13
4
Storing model object in session in EdgeRails
I''m having a problem with sessions since upgrading to EdgeRails. Against
certain recomendations, I''m storing the current user''s model object in
the session. This worked fine in 1.0 and earlier, but now I am noticing
that any time I reference the associated objects for an object stored in
the session, the associated objects get copied into the session! For
example,
2006 Mar 29
5
EdgeRails: "undefined method `weight'' for #<Hash:
Hi all,
I was playing with the sample project found on the Wiki at
http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails
, and everything was working fine, ... till I moved to EdgeRails :
undefined method `weight'' for #<Hash:0x22c7150>
(full error thread below)
Any idea?
Alain
2006 Sep 18
2
Datebocks and EdgeRails
Hello,
I am having trouble trying to use the Datebooks Engine with Edge Rails.
Has anybody try with it?
It seems that the problem has something with loading the layout, and
complaints about the number of arguments.
I will thank any help or guide.
Thank you very much.
=========================
I have copied the error I get
ArgumentError
wrong number of arguments (2 for 1)
RAILS_ROOT:
2007 Sep 28
4
RSpec + EdgeRails on Windows
I recently post on my blog about setting up a Rails environment with RSpec
in Windows, and someone left a comment saying that it doesn''t work in
EdgeRails. I so I played around with it a bit and was able to confirm that
none RSpec appears broken on EdgeRails. I''ll post the various error messages
I received below. I''m not expecting any sort of patch or something for this
2006 Mar 21
4
Broken config/lighttpd.conf? (in EdgeRails)
I''m using Mac OS X, I installed Ruby/Rails/lighttpd/etc via the
instructions from hivelogic. I think I''ve found a bug with
EdgeRails, but I''m not sure how to submit it (and maybe I''m doing
something wrong and someone can just point me in the right
direction). Anyway I thought I''d report it just in case it is a bug.
I''ve downloaded
2006 Mar 04
3
:class in link_to_remote?
Is there a way to set the class of a link in link_to_remote? I tried
adding :class => "this_damn_class" after the :url hash and it didn''t
work.
I went ahead and did it manually using remote_function, i.e.
<a class="this_damn_class" href="#" onclick="<%= remote_function ...,
:url => {...} %>">My Link</a>
--
Posted via