search for: ee4meeah724

Displaying 20 results from an estimated 162 matches for "ee4meeah724".

2011 Feb 27
10
How to store the same key multi times in a Hash ?
given an Arra tags[] I need to produce a resulting Hash as following .. { "$in" => [tags[0]], "$in" =>[tags[1], ...} in which the key should be always the same and the value being an Array I tried this : myHash = {} tags.each do |tag| h = {"$in" => [tag]} myHash.merge!(h) end but the merge! is only
2011 May 22
6
How to capture correctly a specific exception
I a using delayed_job, and I am raising an exception this way : config/initializers/custom_exceptions.rb class RemoteLockerException < StandardError; end class RemoteLockerDenied < StandardError; end lib/instruction_request_job.rb class InstructionRequestJob < Struct.new(:style, :request_id) def perform .... > connector =
2010 Aug 12
4
[Rails 3] How to test routes urls in console
I tried require ''url_writer'' but this is not the trick what should be required/included to test the routes urls ? thanks erwin -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this
2006 Sep 15
3
How to catch a parameter that contains a full url
Hi I need some help! I have controller that I need to pass a full url (with its own parametrs) as a parameter, e.g. I want to call my controller with: /mycontroller/catchurl?url=http://somedomain.com/afile.jsp?param1=xx&param2=yy and in action "catchurl" in mycontroller.rb I would like to have params[:url] to be "http://somedomain.com/afile.jsp?param1=xx&param2=yy"
2012 Oct 16
8
<form> tag is self-closing before input fields .. (HAML generator used)
The form is inside a table, enclosing a <tr> = form_tag admins_backoffice_dashboards_path, :remote =>"true" do %tr.search %th= link_to t(:clear), "#", :id => :clearFilter %th= select_tag :role, options_from_collection_for_select(Role.global, :id, :name, :selected => @role_id ) %th= text_field_tag :email, nil, :value
2011 Apr 23
3
Rails3 how to scope it, using a serialized array ?
giving a simple model, with a serialized Array attribute class Instructor < User .. serialize :languages, Array I am looking in defining scopes like this : >scope speaking_english, lambda { where("languages ... includes.... ?", :en) } which look for instructors in which the languages array include ":en" Is this kind of scope possible ? or not.... ( just using
2008 Jun 04
9
How to achieve the 'multi' fade effect that is used by Apple computer?
Hi all! My first post here, so: be gentle ;-) I have been playing around with the scriptaculous library for a while now, and I must admit it is great. However, there is one thing that I''m notable to achieve: On Apple computers website for ilife (iphoto) http://www.apple.com/ilife/iphoto/ there is a verrrryyy nice fade effect going on when you click the navigation for ''new in
2011 Nov 15
4
Need some guidance on running shell commands from my app..
During execution in my Rails web app, I need to create a virtual host config on my Linux server, but I don''t know what would be the best way to do it , here are the steps ( my_domain.com is fixed, only my_subdomain is changing dynamically 1- create: /var/www/vhosts/my_domain.com/subdomains/my_subdomain/conf/ vhost.conf ServerName mysubdomain.mydomain.com .. content is always the
2009 Feb 09
2
dynamic constant assignment
I have a constant set up like that : ALL_LOCALES => {"it"=>"Italian", "fr"=>"Français", "de"=>"Deutsch", "en- GB"=>"English (UK)", "es"=>"Español (España)", "pt-PT"=>"Português", "pl"=>"Polski", "en-US"=>"English
2012 Mar 26
3
render :json not sending any data back ...
[rails 3.2.2] I perform an ajax call : ... $.ajax url: " /backoffice/expenses/rate" type: "GET" dataType: "json" data: project_id: $(''#project_id'').val() code: $(this).val() success: (result) -> alert result $(''#expense_price'').val(result) in
2006 Nov 22
3
RESTful web service design question
I''m working on a Rails app that needs to expose a RESTful web service. I''m curious to know some of the best practices as it relates to RESTful API design. Let''s say I have a set of related objects on the server side. I''ll use the venerable subscribers, subscriptions and magazines example to lay it out. class Subscriber < AR has_many :subscriptions
2005 Dec 20
3
File Column Directory Add another layer
Quick Question. I understand how to change the default path to something other than public but what if I wanted to add another directory into the equation. I want to upload an image into the following structure: /public/image/userid/imageid/test.gif So basically I want to look up the userid in my users table and put all the images for that user in the same directory. So i have a one
2009 Apr 06
2
URL issue localhost/mongrel vs remote-server/apache
Hi all I have a small issue I ma trying to solve (at least to understand..) I am testing an app on my remote_server (w Apache/Passenger) in a sub_URI, without any problem (I tested also the same app, locally w Apache too) in my environment.rb , I have initialized config.action_controller.relative_url_root = "/my_subURI" config.action_controller.asset_host =
2006 Nov 18
1
ActiveResource sample code?
I''d like to play around a bit with ActiveResource for consuming a web service. Does anyone have sample code they would be willing to share? I''ve googled all around and have come up empty except for simple (non- working) examples given in the RailsConf keynote and some associated blog entries. Thanks! cr --~--~---------~--~----~------------~-------~--~----~ You received
2008 Jan 16
2
Ruby on Rails Software in German!
I''m really excited to announce that my company launched its first Ruby on Rails software - in German! Who else is out there programming Ruby on Rails in German? Are there any other software pieces in German? I''d definitely be exciting to see how the framework develops in Germany, Austria and Switzerland. --~--~---------~--~----~------------~-------~--~----~ You received this
2009 Jun 28
2
validation error messages in Form - how to disable the ActionView::Base.field_error_proc ?
I wrote the following code in my form view : <li><label for="email">Email</label> <%= form.text_field :email, :size => "30" %> <span id=''email_error'' class=\''warning-text warning-text-indent\''><%= @user.errors.on(:email) %></span></li> the generated html code is the following : <span
2012 Nov 09
8
method conditional option pattern
When I have this pattern sign_me(@user, :event => :authentication, :subdomain => subdomain) how can I write it to avoid sending the :subdomain option if subdomain.nil? ( if possible ..) sign_me(@user, :event => :authentication #?, :subdomain => subdomain unless subdomain.nil? ) -- You received this message because you are subscribed to the Google Groups
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field = form_for (Clip.new), :html => {:multipart => true} , :remote => true , do |f| = f.hidden_field :user_id, {:value => current_user.id} = f.text_field :name = f.text_area :description = f.file_field :image = f.submit I18n.t(:add) generating the html code <form accept-charset="UTF-8"
2008 Jul 08
2
select helper still the worth thing in rails...
I have been trying all the day to make it happen, initial display is fine , but I cannot redisplay the selected value once the choice is done in my select helper I setup my slector in a helper (need to include the first option ''all'', as a prompt is displayed only once.... in my partial def company_role_selection(selection=nil) roles= [[''all'', 0]]
2010 Aug 18
2
[Rails 3] remote_function ?
Is the remote_function still valid in Rails 3 as it seems many of the Prototype helpers have been replaced ? (link_to_remote, ...) where can I find any link on it ? not in the standard doc I guess .. thanks for you feedback -- 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