similar to: Change simple format

Displaying 20 results from an estimated 9000 matches similar to: "Change simple format"

2008 May 29
4
ruby's simple_format method is not working for spaces.
Ruby''s simple_format method is not working for spaces. so how to add and what to add in simple format method code so it also work for spaces? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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
2006 Dec 05
1
Using render inside a FormBuilder (EdgeRails)
I''m using the latest trunk of 1.2-ish, and I''m wondering how to do what I want to do. I am using a form_for :builder I wrote, simply called TableFormBuilder after the rails cookbook, and want to be able to present help icons automatically. I want these icons to appear next to form fields I am rendering. For example, I have this method in helpers/table_form_builder.rb: # This
2011 Jun 26
1
ActionView::Template::Error (Cannot modify SafeBuffer in place):
Hello, Trying to upgrade an app that was running fine in 3.0.3 to 3.0.9 and while everything works well, I get this error: ActionView::Template::Error (Cannot modify SafeBuffer in place): When passing a string to this function (in application_helper.rb) through a simple: <%= format_me(article[shortdesc])%> def format_me(text, html_options={}, options={}) text =
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,
2007 Mar 15
1
Helper content_tag and Blocks
The content_tag helper allows you to do things like: content_tag(:p, "Hello world!") # => <p>Hello world!</p> It can take in blocks, for functionality like this: <% content_tag :div, :class => "strong" do -%> Hello world! <% end -%> # => <div class="strong"><p>Hello world!</p></div> Unfortunately blocks
2006 Apr 11
1
content_tag can not work?
the tag helper "content_tag" can not work correnctedly on my enviroment: page.insert_html :bottom, ''body'', content_tag("div","id"=>"tag") then in body,i can only get "idtag" as the text! but if i use : content_tag("p","hello world") I can get it worked. From the rails 1.1 api document,i can find the
2007 Jan 24
1
Removing empty class attribute from @template.content_tag
Hey all, I have a quick question regarding the @template.content_tag methos when creating a custom form builder. Currently have the following method in my AccessibleBuilder class: def datetime_select(field, options = {}) required = options.delete :required label = options.delete :label @template.content_tag("div", @template.content_tag( "span", Example Label ) +
2007 Nov 10
3
Wrapper Helper Help Please
Hi all. I''m hoping this is a simple one that someone can put me right on. I have a view that ''wraps'' some div''s around a Page Header and Page Content, for formatting reasons: <div id="LHS"> <div class="Page"> <div class="PageHeader"> ''Header Here'' </div> <div
2006 Jul 13
1
From the Agile book, page 144 regarding a div tag helper
Hi. in the Rails Agile book here''s what was happening: >>> module StoreHelper def hidden_div_if(condition, attributes = {}) if condition attributes["style" ] = "display: none" end attrs = tag_options(attributes.stringify_keys) "<div #{attrs}>" end # format_price method ... end Note that we cheated slightly here. We copied code from the Rails
2006 Jun 19
2
content_tag question
Am trying to insert a link to delete via ajax in my RJS template. Can one use content_tag and link_to_remote like this in a RJS template? a = content_tag(''a'', link_to_remote("Delete", :update => "categories", :url => {:action => "delete", :name => category.name})) -Thanks. -- Posted via http://www.ruby-forum.com/.
2008 Aug 28
2
tree structure in rails?
Hi, Is there is any way in ruby on rails where we show all my groups there subgroups with check boxes in tree structure way? e.g group A | ----Group A.1 | ----Group A.2 | ---------Group A.2.1 All with check boxes and subgroup opens when click on root ? -- Posted via
2006 Apr 30
0
Using a DIV or SPAN for a content_tag (link_to_remote)
I was wondering if there was an easy way to over ride the <a> tag that is used as the content_tag() value when using link_to_remote(), perhaps using a SPAN or DIV. I see follow the chain in the source code and I guess I could write my own helper, but I was wondering if there was a way to do this already? I know already that SPAN''s and DIV''s are not supported
2013 May 30
2
Re: libguestfs-1.22.1 compilation error
Yes i am using ArchLinux (what else is there ?) and i hate/love (mixed feelings) when you have a valid point and give such pointers! indeed there is a diff between your perl and mine [tmp]> diff -u rwm perl --- rwm 2013-05-30 13:24:21.066286908 +0300 +++ perl 2013-05-30 13:26:27.149615793 +0300 @@ -1,14 +1,14 @@ - if ($t =~ /\G([^\n]{0,$ll})($break|\n+|\z)/xmgc) { + if
2010 Mar 24
3
flash error & fade away
this is my current code: #notice { border: solid 1px #99cc99; background-color: #e2f9e3; color: #006600; padding: 5px; margin-bottom: 5px; } #notice.error { border-color: #e2f9e3; background-color: #eeaaaa; color: #cc0000; } <% flash.each do |key, msg| %> <%= content_tag :div, flash[:error] || flash[:notice], :id => ''notice'', :class =>
2006 Feb 27
0
Example code for select_from_db (a.k.a. combo box)
I''m not asking for help this time! :) :) In almost every Rails project I create, I find that I want a select() popup menu that is pre-populated by data from the database. Also, I want an "Other..." option that presents a text_field_tag to input another (not presented) option (basically a combo-box). In an attempt to be as DRY as possible, I''ve come up with
2019 Apr 27
1
update failure
On 4/22/19 10:45 AM, Ulf Volmer wrote: > On 22.04.19 18:12, Emmett Culley via CentOS wrote: >> On 4/21/19 10:15 AM, Ulf Volmer wrote: > >>> package-cleanup --dupes >>> >>> will list the duplicate packages >>> >>> package-cleanup --cleandupes >>> >>> will remove the dupes. If I remember correctly, you have to add
2013 May 30
0
Re: libguestfs-1.22.1 compilation error
On Thu, May 30, 2013 at 01:37:34PM +0300, Evaggelos Balaskas wrote: > [tmp]> diff -u rwm perl > --- rwm 2013-05-30 13:24:21.066286908 +0300 > +++ perl 2013-05-30 13:26:27.149615793 +0300 > @@ -1,14 +1,14 @@ > - if ($t =~ /\G([^\n]{0,$ll})($break|\n+|\z)/xmgc) { > + if ($t =~ /\G((?:(?=[^\n])\X){0,$ll})($break|\n+|\z)/xmgc) { > $r .=
2007 Jul 15
0
errors_for
Been playing with merb. One of the helpers I liked in rails was on form validations. Found this was real easy to port over, so I thought I''d share. It doesn''t highlight the field with the error, but it gives that same nice little div on top. Say I had an articles controller def create @article = Article.new(params[:article]) @article.save! redirect
2011 Jun 10
2
Sorting Data Frame Without Loop
Hello all! I am currently trying to sort a data frame in a particular way, but I am having some difficulties with this. Specifically I want to sort the below dataset in such a way that there is only one line per ProteinID and if there are multiple GeneID or GeneName entries for a single proteinID, that they be concatenated with a comma separating them. The way I have done it earlier worked fine
2014 Jan 06
0
[SIEVE] Locking Errors with vnd.dovecot.duplicate Extension
Hi, we are running a 4 host setup which each hosts a director+mailbox which is mounted via NFSv4 from a DRBD cluster. * Dovecot upstream release 2.1.16 * Doveadm batch subcommand fix - http://hg.dovecot.org/dovecot-2.1/raw-rev/850b5d8bbcc9 * Pigeonhole release 0.3.4 Now we would like to remove duplicate Mails using the vnd.dovecot.duplicate extension using a SIEVE script like this: require