similar to: conditional value in xml node

Displaying 20 results from an estimated 6000 matches similar to: "conditional value in xml node"

2007 Jun 26
3
what is the :or parameter in a submit_tag ?
I read the following tag in teh Beast example <%= submit_tag''Login'', :or => link_to_function(''forgotten password'', "$(''reset-password'').toggle();") %> I understand the link_to_function, but what is this :or parameter used for ? the link doesn''t appear, so it cannot be used... thanks for your lights kad --
2007 Dec 08
6
Rails 2.0 ActionMailer breaks my redmine render_message
I am using ''redmine'' (v 0.6) as my major project manager, seems running fine w Rails 2.0 (slight modifs for paginations..) but I am stuck with a major error when sending a confirmation email : mailer.rb class Mailer < ActionMailer::Base .... # Renders a message with the corresponding layout def render_message(method_name, body) layout =
2007 May 10
13
REST own action
I can sent my own action to a users_controller stating in routes.rb map.resources :users, :member => { :network => get } I defined in my users_controller the network action.... so I can have an url like "http://localhost:3000/users/168.xml;network" now I would like to have another action network_plus which is a little bit different fron the network.. sure, I can state another
2006 Oct 14
2
sending parameters with link_to_remote Ajax Request
In a panel, I have an hidden input field which is modified by a javascript function (from calendar) how can I sent the value of this input field in my link_to_remote call ? presently I just send back one parameter (an id) but I need both... <input type="hidden" name="booking[start_at]" id="f_date_s" value="booking[start_at]" /> ... <%=
2007 Jan 20
2
find_by_sql with named parameterized sql
I tried to use named parameters in my SQL query , using find_by_sql Order.find_by_sql ([select * from orders where amount > ? and quantity > ?", [ @amount, @quantity ] works;.. but Order.find_by_sql ([select * from orders where amount > :amount and quantity > :quantity ", [ :amount => @amt, :quantity => @qty ] is not working a I wrong or should I use a plain select
2005 Nov 03
1
Builder / rxml views: hyphens in XML element names
I''m having a strange problem with an rxml view - it won''t let me put hyphens in the names of XML elements. The original problem line was: xml.VISA-SSL do But in any other place, if I insert a hyphen into the name of any arbitrary element, I get the following kind of error: undefined method `theTextAfterTheHyphen'' for #<#<Class:0xb7617180>:0xb7616f28>
2007 Jun 12
3
REST Routing issue
If I use http://0.0.0.0:3000/users/25/messages/new I can create a new message ressource for user 25 that''s OK.... I would like to be able to use such url : http://0.0.0.0:3000/users/25/messages;send?to=5 in order to create a new message from user 25 for a specific receiver how should write my route ? I tried.... map.resources :users do |users| users.resources :messages,
2007 Dec 22
8
Rails 2.0 rescue_from
I am trying to use the new Rails 2.0 macro : rescue_from class PostsController < ApplicationController rescue_from ActiveRecord::RecordNotFound, :with => :deny_access ... def show @post = Post.find_by_id(params[:id]) raise ActiveRecord::RecordNotFound if @post.nil? #illegal access ..... end def deny_access respond_to do |format| format.html end end but the
2007 Jun 30
2
REST Route how to avoid hacking routes
what''s the best protection against someone trying to modify an URL in a named route /users/25/posts if the user enter another URL /users/26/posts, he can get acces to user 26 posts unless .. a before_filter is checking the current_user ID but is there any other way to do it ? thanks for your lights kad -- Posted via http://www.ruby-forum.com/.
2007 Jul 19
0
xml builder cache (with a slight problem on initial load)
Let me give you the background. I am using rxml for a lot of my views for a rails project. I also noticed that there is a lot of the XML being dynamically generated on data that doesn''t change that often. I worked on trying to cache the xml fragment that I needed but came to the quick realization that cache only handle ERB/RHTML files. Needless to say, I have spent some time creating an
2006 Oct 31
3
ActionMailer how to check mail sent
OS X 10.4.8 I am sending an email via Actionmailer settings are written correctly in environment.rb ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.raise_delivery_errors = :true ActionMailer::Base.perform_deliveries = :true ActionMailer::Base.default_charset = "utf-8" ActionMailer::Base.server_settings = { :address => "mail.mydomain.com", :port => 25,
2009 Apr 22
1
how can I get the friends of a fb user only using his facebook id
hello, with facebooker can I get a list of someone''s facebook friends, only using his facebook id? If yes, then please let me know how... (and don''t read further) If this is not possible, then here is my problem: ------------------------------------------- I have a flash movie embedded in the canvas page of my Facebooker application. The movie gets information from an xml
2006 Aug 04
3
<img onclick> vs link_to_remote()
In one of my view , I have an image the user need to click to close a <div>selections</div> added by an Ajax call. if I use : <img src ="/images/icon_closeitem.gif", size="16*16", border="0",alt="Close Selection", title="Close", onclick="<%= remote_function(:url => { :controller => ''property'',
2006 Aug 13
1
select include_blank true
Is there any way to display a default message value ''Select'' rather tha an empty value when using this option ? kad -- Posted via http://www.ruby-forum.com/.
2007 Sep 08
1
Unknown Action doesn't raise exception ?
As I am in development environment, I wrote in my config/environment.rb ActionController::Base.consider_all_requests_local = false in my application.rb, I wrote def rescue_action_in_public(exception) case exception when RoutingError, UnknownAction render :file => "#{RAILS_ROOT}/public/404.html", :status => 404 else logger.error
2007 Jan 31
1
RJS collection proxy
I would like to update the class of all <a> tags found in a div of my page.. I can get it all (seeing the index and value) using : page.select("#header_domain_map a").each do |value, index| page << ''alert(value);'' end but how can I set the classof all these elements to class="active" tfyl kad -- Posted via http://www.ruby-forum.com/.
2006 Oct 03
1
line too long in editor... (textmate)
my where :condition string line is too long in my editor, (Textmate...) if I do a LR, I got a \n in my string, how can i get it displayed in multilines without this garbage in the string : here is the kind of string I am manipulating cond_a.append ["(bookings.start_at == ? OR bookings.end_at == ? ) OR (bookings.start_at <= ? AND bookings.end_at >= ? )",
2008 Jan 04
0
REST: Handling homepage and pagination for XML
Hi you all, I have two questions regarding a REST app and the XML responses: - Homepage: I want to have a kind of homepage to list all the list of resources the user can access to. I''ve read I can do it with just an index.html. However, my app also offers the response in XML so, what if the client want the XML? Can I have an index.rxml too? In [1], they offer the possibility to have a
2007 Mar 26
2
Issue generating XML with hyphenated element names
Hello... I''m trying to generate and XML file using .rxml and I''m having a problem with element names that contain a hyphen. Here is a chunk of the .rxml file: xml.instruct! :xml, :version=>"1.0" xml.properties do @properties.each do |p| xml.property do xml.location do xml.street-address(p.street_address) xml.city-name(p.city) .. end end end
2006 Sep 06
3
url_for , controller routing error
I have an ''account_controller.rb'' in an ''admin'' module I list the accounts with : http://0.0.0.0:3000/admin/accounts/list, and get my table trying to sort it, I use the follwoing sort_link_helper : def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param options = { :url =>