similar to: Ajax Scaffold is htmlescaping "&" in url''s

Displaying 20 results from an estimated 200 matches similar to: "Ajax Scaffold is htmlescaping "&" in url''s"

2010 Mar 08
2
using sprintf to pass a variable to a RMySQL query
Hello, I am using RmySQL and would like to iterate through a few queries. I would like to use sprintf but I think I'm having problems mixing and matching the sprintf syntax and the SQL regex. I have checked my sqlcmd and it works when I wan to match %MG1% but how do I iterate for i 1-72? Escape characters,? thanks in advance i<-1 sqlcmd_ScaffLen<-sprintf('SELECT scaffold.length
2006 Jan 10
1
sql server freetds/odbc question
I''m having an error from Linux via freeTDS/ODBC to SQL Server with cod that runs fine against SQLite and MySQL. Here''s the code: def find_recipes_for_workorder_by_id @recipe_pages, @recipes = paginate_with_sort :recipes, :per_page => 10, \ :conditions => ["recipe.workorder_id = ?", params [:workorder]] render :template =>
2006 Jan 10
1
sql server & linux: left join problem
I''ve got a left join problem of some sort connecting from linux FreeTDS/ODBC to SQL Server. It''s similar to the false post I had earlier, but this is a real problem. Here''s my code: def find_recipes_for_workorder @recipe_pages, @recipes = paginate_with_sort :recipes, :per_page => 10, \ :joins => ''left join workorder on
2006 Apr 30
3
require "ajax_scaffold" in model error
Hi there, I''ve got installed ajax_scaffold_generator (3.1.2, 2.2.1) Anyway I''m following the example here <http://height1percent.com/ articles/2006/04/18/ajaxscaffold-3-1-0-released> which suggests the following in a model file: -------------------------------------------------------- require ''ajax_scaffold'' class Pet < ActiveRecord::Base
2013 Apr 03
2
strange behavior with active relation any? method
In console, I run the following and any? returns true: drivers = Driver.select("drivers.*, drivers.id").joins([:reports, :driving_habits]).where("extract(MONTH FROM reports.time) = ? AND extract(YEAR FROM reports.time) = ?", 3, 2013).uniq.order("drivers.id asc").page(2).per(1) drivers.any? => true This correctly evaluates to true because the relation contains one
2006 May 02
3
Ajax scaffolding respones are received, but not rendered in browser
Hi i installed the latest ajaxscaffolding gem and generated a scaffold. List works fine. Delete deletes, but the update doesn''t show and the busy icon spins indefinitely. Pressing new or edit also causes the busy icon to spin, but again the ui doesn''t update. my development.log indicates the request was handled and (using firebug) I''m seeing this response: new
2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
I have implemented Devise for Authentication and Authorization in ROR application everything seems fine but getting one issue. I have two modals "Account" and "Transactiona" , and so two controllers respectively. My Transaction Index view call one of Account Controller method like this
2005 Nov 03
9
[Idea] session-wide persistent variables
I was thinking about having instance variable stored and fetched from session container automatically before calling an action and after the action is finished. Using methodology of accessors it would look like: class MyController < ActionController::Base persistent_attr :person def alfa person = ''John Smith'' # render as usual view alfa.rhtml with anchor
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions User.find :first, :conditions => ["login=?", params[:username]] but how about with :order, :limit or :group? # uh-oh...spaghetti-oh User.find :first, :order => "login; delete from users; select * from users" Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 Jul 26
0
page.replace_html render(:action => ''other_action'')
I want to be DRY. I have a controller action, component, that renders html. I have another controller action, component_update, that returns RJS: This what I''d like for ''component_update.rjs'': page[params[:scaffold_id]].replace_html render(:action => "component", :layout => false) page[params[:scaffold_id]].visual_effect :highlight But, the render is
2006 Mar 16
0
Ajax_scaffold_generator and datebox_engine
All, I suspect the datebox_engine is not a compatible with AJAX, but I hope I''m wrong. Has anybody succesfully gotten a view that started out life as generated from the ajax_scaffold_generator to have a form element which is a datebox from the datebox_engine? == Details I just tried unsuccessfully. >From the javascript I''m getting a dialog box that says
2006 Feb 25
31
Ajax Scaffold Generator for Rails Released
I just released a whole new version of the Ajax Scaffold Generator (for Ruby on Rails). The generator creates a scaffold page like the typical rails one, except adding, editing and deleting are all done inline. The generated scaffold is valid XHTML strict and fully styled right out of the box. Check out the demo: http://ajaxscaffold.height1percent.com/ And the how-to:
2006 Mar 04
4
AjaxScaffold 2.2.0 released with graceful JS degredation
Just wanted to let anyone know that might have checked out the generator before and couldn''t use it b/c you''re project required graceful degredation. Well its in there now. Thanks everyone and enjoy. Demo: http://ajaxscaffold.height1percent.com Release Notes: http://www.height1percent.com/articles/2006/03/04/ajaxscaffold-2-2-0-released-with-graceful-js-degredation -- Richard
2006 Jul 08
4
Application generation
I love rails but I want more. :-) I''d like a generator that generates a complete application. It would read an information model, and from it generate the MVC''s with a validation-constrained model, errors and exceptions, page navigation and rich view layout... The information model would be represented by ruby "meta" classes, and could be generated as an
2006 May 19
4
Lookup tables and scaffolding
It occurs to me as a missing feature that there''s no way to indicate a lookup table relationship (as opposed to other sorts of foreign key relationships) in Rails and that the scaffolding generator could recognise this lookup and render a drop-down list automagically for the lookup table. Say you have an Address and a State, and the State is a lookup table. In addresses you have
2006 Jan 28
6
Check if user is in right group
What is the best way of checking this? I have 3 tables: groups users group_members class GroupMember < ActiveRecord::Base belongs_to :group belongs_to :user validates_uniqueness_of :user_id, :scope => "group_id" Then I want a method here that checks if a given user is a member of a given group. What is the right way of doing that? def
2008 Jul 17
4
A Mongrel parsing bug: "&" and "&amp;"
When using url_for to send path to a script (such as with auto_complete), multiple params are joined with the "&amp;" code. For example: text_field_with_auto_complete :blog :post, {}, { :posts_path(:a => 1, :b => 2), :method => :get } Produces this script: var blog_post_auto_completer = new Ajax.Autocompleter(''blog_post'',
2010 Jun 13
2
Rails 3, ActionMailer and urls (ampersand encoding)
In Rails 2, if I used an url in a plain text message it was sent as is, but it seems to be changed in Rails 3. The url http://ab.cd/ef?g=1&h=2 seems to be now translated to http://ab.cd/ef?g=1&amp;h=2 even if the message is plain text. Is it correct? I''ve written my tests previously considering it should not be encoded in plain text messages and these tests are failing when
2009 Aug 05
1
Question with apply function
In my continuing quest to generate some summary data, I've come across some useful suggestions in pasts posts. The apply operation returns an error, and I can't figure out why. Can someone help me fix this? testlogdata <- cbind(testlogdata, range_group=cut(testlogdata$lrm_score, breaks=c(.9, .8, .7, .6, .5, .4, .3, .2, .1))) apply(testlogdata, 2, function(x){tapply(x,
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have article_groups as a jointable. Now I want to select every article who is a member of group with id ''1'' and id ''2''. Whats best way to get that? Extract from schemas: CREATE TABLE articles ( id int auto_increment, ingress text NOT NULL, story_text longtext, constraint fk_items_users