Displaying 20 results from an estimated 20000 matches similar to: "using form_tag with a get request with params"
2011 Feb 20
3
ugly url form_tag
Hi all
I am using form_tag helper and everything is sent by the get method.
In the url looks like :
http://localhost:3000/posts?utf8=%E2%9C%93&search=rails
The utf8 attributes is pretty much ugly.
Is there a way (in Rails 3) the url looks like something like :
http://localhost:3000/posts/search/rails
If yes what do I need to change in my code ?
Here is my code
<% form_tag posts_path,
2009 Sep 17
2
Can i use "form_remote_tag" inside the "form_tag"?
Hi all,
How can i use form_remote_tag inside the form_tag helper .
My application has following view subscribe.html.haml
- form_tag :action => :subscribe do
/other form element
%input{:type=>''radio'', :name=>''tariff_plan_id'', :value=>"monthly"}
%input{:type=>''radio'',
2010 Oct 20
2
form_tag not working correctly?
So I''m trying to make
<form action=''/path'' method=''get'' class=''ajax_box''>
using:
<% form_tag :action => "search_for", {:method => :get, :class =>
''ajax_box''} do %>
but I get:
<form action=''/path?method=get&class=''ajax_box''
2011 May 05
1
Array params in form_tag
Hello i have a lot of time trying to figure this out.
I am having problem sending array params with form_tag :remote=>true
form.erb
<%#= form_tag reporte_client_reports_path do%>
<%= form_tag reporte_client_reports_path,:remote=>true do%>
<p>
<%= label_tag :cuts %>
<%= select_tag "cuts[]", options_from_collection_for_select(@cuts,
2010 Oct 25
2
form_tag with remote=>true Error during failsafe response:
I am trying to find out why form_tag with remote => true is not
sending an ajax response and only sending HTML. I have started a basic
Rails App with two pages and am following the Railscast 205 UJS
example. Every time I include:-
<%= form_tag homepages_path, :method => ''get'', remote => true do %>
I get from the server(WEBrick):- (Ruby 1.9.2 and Rails 3)
A 500
2012 Aug 13
9
Using Jquery plugin "tokenInput" with rails
Hi,
I made a contact manager app using rails. I added TokenInput plugin to
introduce an instant contact search functionality in it. Tried following a
railscast http://railscasts.com/episodes/258-token-fields but have been
struggling with it for a while. Following is the code I use in my view
<%= form_tag({:action => ''show'', :id => @contact_tokens}, :remote =>
2012 Apr 18
2
RoR - Search Forms with Checkboxes, display appropriate results
I have a form that allows me to search a hotel by city or name and by
rating through radio buttons. It all works.
However, my hotel model has_one :facility, this facility model is
composed by several boolean fields (for example, roomservice:boolean
restaurant:boolean and so on)
The question is, I want to add checkbox fields for each facility I have
and in the search form, when the user selects
2013 Dec 10
2
form_tag + fields_for Rails 4
Hi There,
I''m trying to user fields_for inside a form_tag, but i can''t catch it
on my controller.
I just take some html code off to makes it easy to read
my view...
i''m using campuses_path(current_church, @campus) instead form_for
@campus, because my route is like
resources :campuses, :path => ":church/campuses"
<%= form_tag
2012 May 24
3
rails ajax issues
Hi
* *I think this is my 4 or 5th post about the ajax issues with my rails
code. But i couldn''t rectify my issues sofar.
problem is,
In my pages.html.erb have one text field and button. when i click on that
button, the text field value will get into the controller through ajax,so
after the function i need to get that value(textfield value) in same
page.
*page.html.erb*
2007 Aug 03
2
Does collection_select work in list.rhtml?
Hi,
I have 2 models:
Model 1: er, Columns: <er_id, er_name>
Model 2: er_process, Columns: <er_id, er_process_name>
er_id is a foreign key for Model 2.
When I am creating a new er_process or editing an existing one, I have
been successful to use collection_select to show the available er''s so
that the user can select a particular er by its name (to populate the
er_id
2008 Feb 20
1
text_field_tag - different parameter name
Hi, I have one problem with validation
I am creating e-shop and I have products. This view look like this:
<% for product in @category.products %>
<div class="produktyBox">
<%= product.title %><br />
Price: <br />
<div style="color:red; font-size:large; font-weight:bold; margin-
bottom:5px"><%=
2012 Nov 29
2
[Rails 3.2] form_tag w :remote => true doesn't fire up the js format
I have a form_tag written like this :
= form_tag search_backoffice_places_path, {:remote =>"true", :id =>
:searchplaceForm } do
.. input fields
= submit_tag t(:search)
generated html is correct :
<form accept-charset="UTF-8" action="/en/backoffice/places/search"
data-remote="true" id="searchplaceForm" method="post">
...
2007 Jan 18
7
form_tag broken in Rails 1.2 RC2 or is it me?
I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the
form is not being rendered. It''s just not there. My view is this:
<div class="box">
<fieldset>
<legend>Log in</legend>
<% form_tag do %>
<div class="row">
<div class="formfield">
<label
2008 Mar 16
1
form_for error
Hi all,
I have the following code in my application layout:
<div id="utility">
<% if logged_in? %>
<%= link_to "Sign Out", logout_path %>
<% else %>
<%= link_to_function "Sign in",
"$(''signin'').toggle();$(''signin_link'').toggle()",
:id => "signin_link" %>
2011 Feb 18
1
why 'Template missing' error with form_tag?
ROR newbie here...
I''m trying to build a form to upload a CSV file, then parse and store the
data. I have debugged this code up this point, but now when I browse to my
csv file, and click Upload, I get this error:
"Missing template uploads/process_file.html.erb in view path..."
Here is my view (in /uploads/new.html.erb)
<% form_tag ({:action =>
2010 May 26
6
Understanding Form_for
OK, so I''m an absolute noob at Ruby on Rails. I''ve read a lot of
information I can find about form_for and most of them use form_for to
create new items that get saved into the database and can be viewed
later to edit, destroy, etc. In this case, the database will fill up
with whatever the user wrote and I just want my program to have no
information stored.
I''ve been
2011 Mar 08
1
form_tag for search bar with Rails 3.0.5
I have a controller and view that should be providing a search bar
that brings up that brings up a selected record on submission. I have
tried several variations, including just specifying the assets_path,
but usually end up with either an error or a submission to the index
action, rather than the show action. Currently, I have the following
in my index.html.haml:
= form_tag({:controller =>
2007 Oct 05
7
Trouble with text_field_tag
I am trying to implement a basic login page:
login.rhtml
1 <fieldset>
2 <% form_tag do %>
3 <label for="name">Name:</label>
4 <%= text_field_tag :name, params[:name] %>
5 <label for="password">Password:</label>
6 <%= password_field_tag :password, params[:password] %>
7 <%= submit_tag
2011 Sep 09
9
Captcha conception
Hi guys, the next problem:
I create a controller, (/controllers/rmagick_controller.rb), which have
aim to test an captcha
Actions:
def download # creates an captcha image
def show # show the page where image took place
def check # must check right captcha or wrong
views/rmagick/show.html.erb:
> <div id="captcha">
> <p><%= image_tag download_rmagick_path
2010 Mar 29
6
Updating records
So I would like to be able to update a record without having to load the
edit page. Lets use checking out a book as an example. From the front
page of my application I would like to be able to have a form field
where I can enter a record id and select one of a couple of check boxes
and then hit submit which will update the associated record with the
action selected by the check box (check out,