Displaying 20 results from an estimated 30000 matches similar to: "Rails 2.3.8 Upgrade Mods"
2011 Nov 01
2
Railscast 262 different partial in helper
Hi RoR Community,
in Ryan Bates Railscasts Episode #262 he put the index code
<% for message in @messages %>
<div class="message">
<div class="created_at"><%= message.created_at.strftime("%B %d, %Y")
%></div>
<div class="content">
<%= message.content %>
</div>
<div
2013 Feb 12
2
Rails parameters get lost because of jQuery link
(Original
post: http://stackoverflow.com/questions/14569721/rails-parameters-get-lost-because-of-jquery-link,
unfortunately no response)
I saw this Railscast (
http://railscasts.com/episodes/240-search-sort-paginate-with-ajax) the
other day and wanted to use the techniques for an application of mine. I
have a page with elements on it and I want to sort them by values and
select them by tags.
2010 Dec 25
1
Advanced search without database
Hello guys,
Im trying to make an advanced search form, actually i did like Ryan Bates
teaches in this railscast :
http://railscasts.com/episodes/111-advanced-search-form
But my problem is that i dont want to save the searches in my database and i
dont know how to do this...
In the railscast, there was a comment like this:
*14. Karl <http://www.vbsfinder.com/> May 26, 2008 at 23:01 *
2010 Aug 03
7
rails 2.3.8 and html_safe
Hi,
Can somebody update me on the state of html_safe strings in rails 2.3.8?
I know rails 2.3.6 and 2.3.7 broke a lot of code because strings were
being escaped when they shouldn''t have been and I thought this was all
fixed in 2.3.8.
I''m upgrading an app from 2.3.5 to 2.3.8 and there are many spots where
previous code was output correctly and now it expects html_safe method
2011 Jun 03
0
Rack Middleware support for Rails 2.0.2? If not what is the alternative to implement similar functionality in Rails 2.0.2..
Hello all,
I am using Rails 2.0.2 and Ruby 1.8.7 and I need to make use of rack
middleware for integrating an ajax file upload plugin(https://
github.com/valums/file-uploader) with paperclip in Rails( As given in
this tutorial:-
http://mooooooooooo.wordpress.com/2010/12/03/paperclip-valums%E2%80%99s-file-uploader-and-middleware-continued/).
I have referred to the rack-middleware Railscast by
2010 Nov 06
0
Rails and JQuery and Ajax/Json question
Hi,
I am using JQuery in my rails app. I''ve taken the approach outlined
in Ryan Bates''s Railscast on jquery to do the following:
jQuery.ajaxSetup({
''beforeSend'' : function(xhr) {xhr.setRequestHeader("Accept",
"text/javascript")}
});
to set my ajax call request Headers to text/javascript so that my
respond to block for javascript is
2012 Sep 20
7
jQueryUI autocomplete (Rails 3.1): can't get source as url to work
Hey,
I''m able to duplicate everything in Ryan Bates'' screencast on jQueryUI
autocomplete (#102<http://railscasts.com/episodes/102-auto-complete-association-revised>),
except for the piece that calls the server for completion data.
Here is my view html:
<input data-autocomplete-source="/searches" id="search-markets"
2010 Feb 02
0
[Security] Loofah has an HTML injection / XSS vulnerability, please upgrade to 0.4.6
Synopsis
----------
Loofah::HTML::Document#text emits unencoded HTML entities prior to
0.4.6. This was originally by design, since the output of #text is
intended to be used in a non-HTML context (such as generation of
human-readable text documents).
However, Loofah::XssFoliate''s default behavior and
Loofah::Helpers#strip_tags
both use #text to strip tags out of the output, meaning that
2010 May 17
6
Should an blank string be html_safe?
Just trying to implement a simple helper over the past few days had me
really confused.
messages = ''''
messages << content_tag(:p, ''dave'')
#=> <p>dave<\p%;gt;
Eventually I realised the original empty string was not html_safe
message = ''''.html_safe
message << content_tag(:p, ''dave'')
#=>
2010 Nov 05
9
[patch] Let's use <%== %> instead of <%= raw() %>
I''ve submitted a small patch to make Rails behave properly with the
Erubis <%== %> construct. For some reason the current behaviour of
that tag in Rails 3 is to escape the contents _twice_ which is
probably a bug.
I offer three suggestions why this is a good idea:
- The syntax is cleaner. It can avoid a lot of .html_safe and raw in
your views. I especially like the conciseness of
2009 May 08
1
filter_parameter_logging for multi model forms
Hi all,
I have a multi model form setup in the classic Ryan Bates Complex
forms style (railscasts.com/episodes/73) for my signup page.
The two models in this are the Account model and the User model and
this structure cannot be changed right now. The User model has
password and password_conf attributes which are, unfortunately, taken
alongwith the rest of the User''s attributes into an
2007 Jul 04
0
HOW I: Wrap content sections using blocks and then nest them using lambdas
This is the type of code that I''m excited when it works but hopefully will
get some suggestions on how to do it better. Last time, the code was a bit
to "ferocious" and I was missing out on a built in feature to rails that I
didn''t know about.
This one is a bit more complex... to factor out all the markup for different
sections of the site I have a bunch of view
2010 Feb 22
3
Rails 2.3.5/Ruby1.8.7 Collection_Select Labels with ampersands "&"
I am having an annoying problem displaying the labels of a select box
correctly where there is an ampersand contained within the label
string.
On a form being rendered with the form_for helper the
collection_select reads data from a Mysql 5.075 database the text
stored in the database is "Surabaya & Surrounding Areas" when rendered
and displayed in firefox 3.6 or safari is is
2010 Aug 17
3
Rails 3 flash message problems
The following code in my application_helper.rb class either eats the
flash message or escapes it and does not display properly:
# Outputs the corresponding flash message if any are set
def flash_messages
messages = []
%w(notice warning error).each do |msg|
messages << content_tag(:div, content_tag(:p,
html_escape(flash[msg.to_sym])), :class => "message
2001 Dec 22
1
Upgrade Samba PDC from 2.2.0 -> 2.2.2
Hi!
I already posted this question to the samba-ntdom list
a few days ago, but haven't got a single answer so far :-(
Learning that the ntdom list will be shut down shortly, I
figured that this list is a more appropriate place to
ask. Isn't it?
So, this is the challenge:
We have samba 2.2.0 running as PDC for a domain with about
30 NT workstations (up to SP6). We are using
2011 Oct 06
0
Rake Routes Blank on upgrade to Rails 3
I have just upgraded an app to rails 3 following the railscast
screencast. I have installed a blank application inside the app to be
upgraded with:
rails new .
I have replaced all the the main files.
When I run rake routes I get no output.
routes.rb:
App::Application.routes.draw do
resources :products
end
(ie, just the default file with an example uncommented)
I have tried a number of
2011 Jul 15
3
Ruby variable that embeds html tags
This seems very simple, but I can''t quite get it. Probably because I''m
just starting out with RoR.
My view has a slew of labels and text fields; many are "required":
<%= f.text_field :screen_name %> <span class="required_field">Required
field</span>
(The "required_field" class turns the text red and smaller.) I''d like
to
2011 Aug 31
0
ERB and binding in template
How to get current binding in a partial (to use helpers and local
variables in erb script)?
When I invoke result whithout binding,
= ERB.new("script").result.html_safe
all work (without vars are needed), but when I write
= ERB.new("script").result(binding).html_safe
(in HAML HTML partial), THE PARTIAL''S REST OF OUTPUT IS CLEAR.
What is the problem?
--
Posted
2010 Mar 01
3
has_many models in a form
Hi, guys.
There are four models in the program, A has_many B through C, B has_many
A through C, A has_many D, D belongs_to A. I have a form to create A.
Inspired by Ryan Bates'' railscasts I was able to create A and D in the
same form, and link A to B(created beforehand) through C in the same
form as well. Is it possible to create A and B in the same form?
Thanks in advance.
--
Posted
2008 Jan 23
2
integrate_views is not executing my views
I wanted to use "integrate_views" as Ryan explains in his RailsCast #71
(http://railscasts.com/episodes/71)
...but I can''t get it to work: the view code in not executed
I looked everywhere but I can''t understand what I am doing wrong.
Here is what I did:
I created a new application from scratch (Rails 2.0.2), added rspec and
rspec_on_rails plugins, and run