Displaying 20 results from an estimated 2000 matches similar to: "How to include html tag inside rails label tag"
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
2009 Apr 12
3
Multi-button form
It cannot be this difficult, especially in rails. Here is my form code
in a partial for the index action of a controller:
<% form_tag({:controller => controller_name, :action => ''index''},
{:method => :get, :class => ''form''}) do %>
<div class="columns">
<div class="column left">
<p>
2008 Dec 18
0
A question about text_field_tag value
This is my rails code:
<%= label_tag ''user_name_label'', ''User Name:'' %>
<%= text_field_tag ''user_name'', ''''%>
<%= label_tag ''view_name_label'', ''View Name:''%>
<%= text_field_tag ''view_name'', '''' %>
I defined a user name text field
2010 Jan 26
2
accepts_nested_attributes_for :has_many :through => 'bug?'
Hey guys & ladies!
I''ve got the following relationship which i''m trying to get
accepts_nested_attributes to work with. But when i submit my form, it
looks as if its expecting a Company object, rather than an array of
companies. which really doesn''t make sense considering its a
has_many :relationship.
So what i''m after, is a way to
2010 Sep 02
7
[PATCH] libxl: make libxl communicate with xenstored by socket or xenbus driver
Hi,
George sent a patch on this problem before, but it was not completed.
This patch makes libxl use xenbus to communicate with xenstored if libxl cannot open a socket. There''s a place that does not close fd in the case of failure, which is also fixed in this patch.
-----------------------------------------Patch------------------------------------------------------
diff -r eff592364826
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
I am trying to rewrite my website in Rails 3 and Ruby 1.9.2.
Can some one help me convert my observe_field which is working under
Rails 2.3.5 to Rails 3. I would like to avoid using JQuery as over the
last year everything I have tried in JQuery has failed, including this
one. Perhaps due to my lack of knowledge. I would not like to install
the legacy upgrade.
What I have in my website is several
2007 Apr 18
1
[Bridge] [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses
From: Evgeny Kravtsunov <emkravts@openvz.org>
compare_ether_addr() implicitly requires that the addresses
passed are 2-bytes aligned in memory.
This is not true for br_stp_change_bridge_id() and
br_stp_recalculate_bridge_id() in which one of the addresses
is unsigned char *, and thus may not be 2-bytes aligned.
Signed-off-by: Evgeny Kravtsunov <emkravts@openvz.org>
Signed-off-by:
2006 Apr 07
8
New to Ruby... installation questions
Hi all,
I''m looking into installing Ruby on Rails on my dedicated server which
is RH Linux with a traditional PHP/MySQL/Apache configuration.
I''m not an expert Linux user, but I can hold my own. My server hosts
around 15 domains with websites of various complexity, some shops, some
CMS, some completely flat. I''m looking for a tutorial explaining how to
install Ruby
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 =>
2006 Jul 26
1
Installing MySQL server (user-pwd)
Hi you all,
I am reading the Rolling with Rails article, by Curt Hibbs. In the
beginning, when he is explaining how to install the MySQL Server, he
comments we mustn''t set up any account cause MySQL uses an
authentication algorithm that is not compatible with the current version
of Rails. Is there any way to avoid this and establish an account with
its password? (I am using MySQL 5.0
2012 Jan 24
1
[PATCH 0/5] Get rid of get_driver() and put_driver()
Greg:
This patch series removes the get_driver() and put_driver() routines
from the kernel.
Those routines don''t do anything useful. Their comments say that they
increment and decrement the driver''s reference count, just like
get_device()/put_device() and a lot of other utility routines. But a
struct driver is _not_ like a struct device! It resembles a piece of
code more
2010 Dec 17
6
copy complete zpool via zfs send/recv
Hi,
I want to move all the ZFS fs from one pool to another, but I don''t want
to "gain" an extra level in the folder structure on the target pool.
On the source zpool I used zfs snapshot -r tank at moveTank on the root fs
and I got a new snapshot in all sub fs, as expected.
Now, I want to use zfs send -R tank at moveTank | zfs recv targetTank/...
which would place all zfs fs
2013 Oct 21
3
Error in heatmap
Hi,
Could you please help?
Heatmap doesn't work with:
> heatmap(as.matrix(SPIV2),na.rm = T)
Error in hclustfun(distfun(x)) :
NA/NaN/Inf in foreign function call (arg 11)
There are no 0 data rows or column
Thanks a lot
Regards
---------------------------------------
David
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 18
0
Ajax call-request.xhr? = false Rails 3
I have the following tag in a view:-
<%= form_tag url_for({:controller => params[:area], :action
=> :search, :area => params[:area] }), :method => :get, :remote =>
true do %>
<%= label_tag(:query, "Search for:") %>
<%= text_field_tag("query", params[:query], :autocomplete =>
"off", :onKeyPress=>"return
2010 Dec 22
1
nested attributes form
Hello!
I have a simple form with a nested attribute (has_one association). Is
works has expected on the new and create actions, the nested attribute
is correctly added in the database.
But when I am on the edit action the nested attributes fields are
empty...
and I am using the same partial for the form.
Am I missing something? Why I don''t get the nested fields displayed?
<%
2012 Jan 18
4
Adding a custom select to omniauth register form
Hi,
I''m creating a rails app using omniauth 1.0.1 on Rails 3.1.3 and ruby
1.9.2
I''m having trouble adding a select field that populates from a class
constant in my user model.
Here''s my model:
class User < ActiveRecord::Base
ROLES = ["Customer","Service Supplier"]
has_many :leads
validates_presence_of :role
def
2009 Feb 15
2
text_area_tag not escaping content by default
I stumbled on the fact that text_area_tag does not HTML escape its
content by default. For example:
text_area_tag "body", "</textarea><script>alert(''xss'');<script>"
If you try that, you''ll see that the content is inserted literally.
Considering the fact that the tag helpers all encode their attribute
values by default, does this
2012 Jul 21
3
Attributes in classes db/migrate or app/models
Hello,
I''ve got some experience in Java, and recently, I''ve begun to practice
with Rails.
One of the things that has surprised to me, after I''ve read some books,
it''s that classes hasn''t got attributes; the attributes are in the files
db/migrate/*. After that, the ORM makes the mapping with de Database.
But the attributes aren''t in the files
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 =>