Displaying 20 results from an estimated 200 matches similar to: "start_form_tag with method GET"
2008 Feb 29
3
How to DRY REST admin path in URLs?
Hi everyone...
For almost all of my objects I put a series of classic REST admin links
in views. For example, for a ''user'', I have
<%= link_to "Show", user_path(user) %>
<%= link_to "Edit", edit_user_path(user) %>
<%= link_to "Destroy", user_path(user), :confirm => "Are you sure",
:method => :delete %>
I am tired
2006 Jan 11
3
How do you do a custom sql call in rails?
Hi.
I am developing an industry specific crm that allows busineses to track
customers in a particular way. Each customer will be assigned a customer
number. The first customer will have a customer number of 1, the second
customer_number = 2, etc... Note that this customer number is not global
but particular to the account that created the customer (see schema snip
below).
I need to have a
2013 Jun 18
1
How to Pass Jquery selected dropdown values and radio button values to controller
Hi,
I have an advance search page and its code is as follows -
I have written my code like this
<div class="container">
<%= form_tag search_index_path, method: :get do %>
<%= radio_button_tag ''user_type'', ''customer'' %><p>Customer</p>
<%= radio_button_tag ''user_type'',
2007 Oct 07
2
How specify foreign key column name in model?
In a model declaration I can specify the name of the primary key
column with
set_primary_key "CUSTOMER_NUMBER"
How can I set the name of a foreign key column that does not conform
to the RoR naming convention. Does the following work?
set_foreign_key "CUSTOMER_NUMBER"
If not, how can I specify the name of the foreign key column? Thanks.
2006 Mar 26
2
Shared Columns in an STI
I have a an STI table which acts_as_tree, that has a large number of
classes/types. My common fields are:
id
parent_id
name
description
with 4 more text fields, I could cover most of my classes if I could
redefine the name of the field like this.
text1 AS address1
text2 AS address2
text3 AS zipcode
For one class and
text 1 AS model_number
text2 AS vendor
Is there a construct that will allow
2006 Jan 19
9
start_form_tag not taking url_for options
I''ve got a form that should post to user/login. The code to start the tag is:
<%= start_form_tag { :controller => "user", :action => "login" } %>
That gives me this exception:
compile error
script/../config/../app/views/user/login.rhtml:1: parse error,
unexpected tASSOC, expecting ''}''
_erbout = ''''; _erbout.concat((
2006 Jan 02
2
Dynamic form tags
Hi all,
I''m happily using "HowToReuseEditViewsForNewViews" found at:
http://wiki.rubyonrails.com/rails/pages/HowToReuseEditViewsForNewViews
There''s this comment there saying you only need the tag "<%= auto_form %>"
when using the code below. Can somebody tell me if that will work when
extending it with model_name (some how)?
I have several new_*
2006 Apr 18
4
how would you take the duplication out of this?
i have these two really similar methods in my addressbook controller.
def edit_company
@company = Company.find(params[:id])
if request.post? and @company.update_attributes(params[:company])
flash[:notice] = ''Company was successfully edited.''
redirect_to :action => ''show'', :id => @company
end
end
def edit_person
2006 Aug 15
1
Question on start_form_tag and get post method
Hi all,
I have a simple question about start_form_tag. It default generates
method=post. I was wondering how you could use start_form_tag to generate
method=get. Probably a simple question but one I can''t answer with the API
doc.
Thanks in advance,
Onno
2006 Jun 27
3
start_form_tag question..
i am trying to get a start_form_tag working, but i am shooting blanks..
here''s what i am trying to do..
i have a controller called "forms.." with an action "new_entry"..
it is called by:
localhost/forms/new_entry
this is just a quick form to test another action..
that action is:
localhost/logger
my question is, how do i construct start form tag in order to
2006 Mar 23
1
start_form_tag how to use the options parameter ?
Hello, I don''t understand how to use the options parameter of
start_form_tag
I want to have the class and id attributes of the form initialized to
"Foo"...
I suppose it''s something like
start_form_tag( :options[''class''] => ''Foo'', :options[''id''] => ''Foo'')
But I can''t figure out the
2006 Jul 12
5
start_form_tag n00b question
Hi,
I''m wondering if there is any way to specify the id of a form tag with the
start_form_tag helper. I''ve tried playing around with ", id=>"marginForm" "
and also inclosing both the action variable and id variable in curley
brackets. The Rails API doesn''t off much help for a n00b like me. It''s
probably really easy but any help you guys
2006 Sep 11
2
Compilation Errors
Hey there,
I just updated to ferret 10.0.4, and acts_as_ferret 0.3, and now when I
try to run my app with mongrel on Windows, I get very strange compile
errors:
ompile error
C:/rails/app/script/../config/../app/views/login/index.rhtml:8: Invalid
char `\002'' in expression
C:/rails/app/script/../config/../app/views/login/index.rhtml:9: syntax
error
_erbout.concat "
2006 Feb 07
3
Newbie help ..
Hi ..
I am new to Rails and it is not clear to me why I am getting the
following error. Any help appreciated.
-m.
$cat app/views/admin/new.rhtml
<% @page_title = "New member..." -%>
<%= start_form_tag( :action => ''create'' ) %>
<table>
<tr>
<td> First Name: </td>
<td> <%= text_field(
2006 Apr 04
2
Syntax Error in find()
Maybe I misunderstand the parameterization of find(), I am getting this
syntax error for
<% @choices = Choic
e.find(:all, :conditions => "question_id" = question.id, :order =>
"order") %>
---- ERROR LOG ----
ActionView::TemplateError (compile error
../config/../app/views/admin/test/show.rhtml:37: syntax error
_erbout.concat " "; @choices =
2007 Sep 19
0
Error with special characters(?)
Hi,
I am having a strange problem.
I have RoR 1.7 installed and a have a HTML page (View) with the folowing
part of code:
<% types = ["AF1", "ALéEL", "AE pé", "CET"]%>
The element of the 2nd index ("AE thé") is causing me problem. The fact
is since the last letter of the string is a special character ("é"), i
have the following
2007 Feb 12
1
Invalid char problem
Has the problem with corrupted .rhtmls (invalid characters) been solved
so far?
I would like to use ferret and acts_as_ferret on Windows XP. I have
installed 0.10.9 (mswin32) which still seems to have the problem.
I am receiving error messages like:
compile error
C:/INSTAN~1.4P1/INSTAN~1/rails_apps/travelogue/config/../app/views/article_editor/_header_read.rhtml:2:
parse error, unexpected
2006 Mar 11
4
Live search in Rails
Hi i''ve been trying to implement live search on rails but Im having
trouble Im using a tutorial at:
http://www.joestelmach.com/blog/live_search_with_ruby_on_rails
But im getting a syntaxerror on line 1
''1: <% if @items && @items.length > 0% >''
I cant fathom what im doing wrong, is that line calling a column in
my database called items?
2007 Nov 16
9
Challenge
The original:
http://pastie.textmate.org/private/lqvrlyyvkv2kbugoxtiz6w
Send your submissions to me by email or on #merb. I''ll blog it, and
pick a winner. The winner does not mean it makes it into Merb, just
means I personally like it best.
But it might make it into Merb.
# Scenario:
# You have a simple application that lists all the monkeys at the zoo.
# Every monkey has a
2007 May 28
2
helper with block compile error
HI,
i''m trying to write a helper that replaces link_to_remote that
accepts a block but it gets a compile error in the template:
I don''t know what I''m doing wrong... TIA
# application_helper.rb
def link_block_to_remote( options = {}, html_options = {}, &block)
concat(link_to_remote(capture(&block), options, html_options),
block.binding)
end
# in