Displaying 20 results from an estimated 2000 matches similar to: "List of html_options available"
2010 Oct 12
5
yml file structure
Hi All,
rake db:create is not working. It is giving an error like
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
syntax error on line 17, col -1: `''
My yml file reads like:
development:
adapter:mysql
encoding:utf8
reconnect:false
database:news_development
pool:5
username:root
password:
host:localhost
There is space at
2006 Jun 01
3
html_options and select()
I am trying to add html_options to select():
<%=select(:user, :id,[[''me'',1],[''myself'',2],[''and I'',3]], :select =>
{},:html_options => {"size" => 5, "multiple" => true})%>
This does not work... How do I get the html_options to work?
ActionView::Helpers::FormOptionsHelper
--
Posted via
2006 Oct 14
2
Documentation for html_options = {}
Hi, trying to locate documentation for html_options = {} as allowed in
RJS calls such as link_to_remote.
Can anyone point me in the right direction please?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2005 Mar 24
5
Using html_options with link_to_remote??
Why doesn''t this output class="delete" into my html?
<%= link_to_remote image_tag("delete"), :update => "relationship_" +
@relationship.id.to_s, :url => { :controller => "relationships", :action
=> "destroy", :id => @relationship.id }, :html_options => {:class =>
"delete"} %>
Regards,
Ben
2005 Aug 15
1
html_options for select_date
As far as I can tell, it''s not possible to use html_options in
conjunction with the select_* helpers.
This means using them in conjunction with observe_field etc is pretty
much impossible.
Does anyone have a patch to add this functionality, or know of a workaround?
I''m having a look at the moment, but not sure how to get it working
without breaking existing stuff.
--
2006 Jul 08
10
A rant about parameters
Guys,
I''ve been chasing a problem with country_select for the past few hours
now. My intention was pretty simple...use the following line in a form:
<p><label for="country_region">Country</label>
<%= f.country_select :country_region, "United States" %></p>
However, for the life of me, I couldn''t get it to work. I kept getting
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
2006 Jul 04
1
select(object, method, choices, options = {}, html_options = {})
Hi,
I''m using:
select(object, method, choices, options = {}, html_options = {})
I''ve read the API where there''s this example:
select("post", "person_id", Person.find_all.collect {|p| [ p.name,
p.id ] }, { :include_blank => true })
should give this code:
<select name="post[person_id]">
<option></option>
2006 Aug 30
0
Add html_options to datetime_select?
Why can''t do so something like:
:onfocus => "alert(''hey'');"
For a datetime_select. I tried doing:
:html => {:onfocus => "alert(''hey'')"}
and
:html_options => {:onfocus => "alert(''hey'')"}
any ideas?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2005 Dec 19
3
Is there a list of html_options for the FormOptionsHelper?
I''m looking for a way to select a default value from a select box, like
this:
select("user", "role_id", Role.find_all.collect {|r| [ r.name, r.id ] },
{ :default_value => ''5'' }
(of course, there is no ":default_value")
If the form is being used on a ''create'' page, it should display a
default in the select box. If
2009 Jul 07
10
link_to, how do you combine url options and html_options?
I have a link-to that I wish to look somewhat like this:
link_to "link here", new_object_path,
:method => :post, :confirm => ''Press OK'', #url
options
:class => "css_class", :id => "css_id" #html
options
In any case I can either get the url_for options to work or the html
options to work, but
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to
4D database) in RoR/postgres and I''m doing okay - but keep running
into things that stump me. It seems like it takes me hours to figure
out something that I could have written in pure code in minutes.
The select_month and select_day helper has been my latest waste of
time. All I''m trying to do is add
2006 Dec 11
6
easy question, how would i search a grandparent???!
hi,
i have this in my code
Article.find_by_contents("#{searchstring} +city:#{passedincity}")
well that returns to me only articles that belong to whatever the user
selected in city.
now is it possible to search the grandparent?
for example
class country
has_many states
class states
has_many cities
belongs_to country
class city
belongs_to states
......
i would like to search
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks,
I think I should start a new thread for this, because a similar one I
saw is a bit old and the resolution there doesn''t seem to apply to
what I''m running into now.
Anyway, my date_select calls are bombing on me with the exception:
----
ActionView::TemplateError (wrong number of arguments (3 for 2)) on
line #8 of entries/_dates_form.haml:
8: = date_select(
2007 Dec 02
4
select and passing some javascript
Hello,
After reading and reading the documentation, I can''t append some
javascript function into a select.
It''s not possible ?
documentation:
-------------------------------------------------------------
select(object, method, choices, options = {}, html_options = {})
some code:
-------------------------------------------------------------
return select(:id, :year, [
2006 Apr 21
1
select box with multiple rows
I want a select box that displays 5 rows instead of one row and a drop down.
so i figure this should work, but it doesn''t.
<%= collection_select(:constellation, :region_id, @regions, :id, :name,
html_options = {:size => ''5''})%>
I am not quite sure how to use that html_options and googling around I didnt
find anything directly on point.
Any suggestions?
2006 Dec 10
1
how to add a class to country_select field
<%=country_select ''user'', ''country''%>
I have the above field, how can I add a class to this?
The api says this, if someone could explain how to get to the
html_options bit, without the others, that would be great?
country_select(object, method, priority_countries = nil, options = {},
html_options = {})
--
Posted via http://www.ruby-forum.com/.
2006 Apr 27
2
How to override pagination_links method
I intend to override pagination_links method.
I added following lines of code in application_helper.rb
module ActionView
module Helpers
def pagination_links(paginator, options={}, html_options={})
raise("boom!!")
end
end
end
But my code is not executing my code. The view is still using the method
pagination_links from rails.
What''s the correct way to override
2006 Mar 18
2
Additional link tag attributes with link_to_function...
Hi,
I''m having a bit of a struggle with link_to_remote. Everything works
exactly as I want it, but the problem is that I want to add another
attribute to the <a>-tag, namely class="". Long story short, I want
specific links to look differently from others, but all of them being
link_to_function. Normally, I''d do this with adding a class="foo" to
2008 Apr 05
2
model select and non-model select_tag
Hello everyone, I''m just trying to understand some logical reasons
behind Rails syntax of "select" and "select_tag".
I know I can do this:
<%= form.select :card_type, supported_card_types,
{ :prompt => "Please Select..."} %>
which sets a model field in the params hash.
If I want to do the same for a non-model field,