[Rails] Re: very strange haml behavior , display fine w html.erb , not in html.haml

2012-01-05 Thread Kad Kerforn
Colin Law wrote in post #1038772: > Have a look at the html of the page (View > Page Source or similar in > browser) in each case and compare them. They must be different. > > Colin Thanks Colin .. they were different using HTML, in the iframe src url, I had : maps?ie=UTF8&f=q&source=s_q

[Rails] Re: Net::HTTP end of file reached

2011-04-27 Thread Kad Kerforn
Bryan Crossland wrote in post #995429: > On Wed, Apr 27, 2011 at 6:11 PM, Erwin wrote: > >> >> wrong on the server side ? >> is there any way to test with another library ? >> >> thanks for your feedback >> >> > When I try that URL in my browser I get a broken video icon. I think > your > URL is b

[Rails] Re: Re: redirection in format.json ...

2010-03-24 Thread Kad Kerforn
Lasse Bunk wrote: > Maybe you're not requesting it properly, making sure that you call the > format.json part? It seems it redirects to requests_url in format.html. > > /Lasse > > 2010/3/23 Kad Kerforn yes... after some tests, I rewrote the original format.json

[Rails] Re: redirection in format.json ...

2010-03-23 Thread Kad Kerforn
in my controller the create action is : respond_to do |format| if @request.save flash[:notice] = 'Request was successfully created.' format.html { redirect_to requests_url } format.xml { render :xml => @request, :status => :created, :location => @request }

[Rails] Re: redirection in format.json ...

2010-03-23 Thread Kad Kerforn
Lasse Bunk wrote: > Here is an example: > > format.json { render :json => { :redirect => requests_url } } > > and then on your client redirect like this: > > if (json.redirect) { > window.location = json.redirect; > } > > Also try http://www.google.com/search?q=json+redirect > > Does

[Rails] Re: Nested Forms - how to displayed the attributes content ?

2009-07-01 Thread Kad Kerforn
> ... > <% form_for :user, :url => { :action => "update" } do |user_form| > %> WRONG need to be : form_for :user, @user, :url => { :action => "update" } do |user_form| Ooops ! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received

[Rails] Re: help from Routing guru ...

2009-05-23 Thread Kad Kerforn
> edit_hub_settings_general GET > /hubs/:hub_id/settings/general/edit(.:format) > {:action=>"edit", :controller=>"hub/settings/general"} > > which is fine... > > I have a general.rb in app/controllers/hub/settings > however, when executing I get the following error : > > uninitialized cons

[Rails] Re: help from Routing guru ...

2009-05-23 Thread Kad Kerforn
Freddy Andersen wrote: > Well you have a namespace for hubs thats why there is no id for the > hubs > > map.resources :hubs do |hub| > hub.resources :settings, :collection => { :general => :get } > end > > That will give you this: > > /hubs/:hub_id/settings/general Thanks Fred... ( I was re

[Rails] has_many through

2009-05-14 Thread Kad Kerforn
I have a User model defined as following : has_many :memberships, :class_name => 'Member', :include => [ :group ] has_many :members, :dependent => :delete_all has_many :groups, :through => :memberships and a Group model has_many :members, :include => :user has_many :users, :through => :

[Rails] Re: ajax form issue

2009-03-24 Thread Kad Kerforn
Greg Donald wrote: > On Tue, Mar 24, 2009 at 9:32 AM, Kad Kerforn > wrote: >> I am also using jquery yo display a facebox in which the form is >> displayed... I don't think there is any problem in using both libraries > > http://docs.jquery.com/Usin

[Rails] Re: ajax form issue

2009-03-24 Thread Kad Kerforn
Kad Kerforn wrote: > Frederick Cheung wrote: >> On Mar 24, 1:08�pm, Kad Kerforn >> wrote: >>> >> One possibility is that if the javascript in your onsubmit raises an >> exception then the browser falls back to normal form submission (eg if >> you d

[Rails] Re: ajax form issue

2009-03-24 Thread Kad Kerforn
Frederick Cheung wrote: > On Mar 24, 1:08�pm, Kad Kerforn > wrote: >> > One possibility is that if the javascript in your onsubmit raises an > exception then the browser falls back to normal form submission (eg if > you don't have the prototype javascript library

[Rails] [rails 2.3.2] ajax form issue

2009-03-24 Thread Kad Kerforn
In a Facebox window (running well with an html form) , I have now an Ajax form written .. but when submitted , the request.xhr? => false what could be wrong ? what did I miss ? thanks for any enlightenment erwin von breizh -- Posted via http://www.ruby-forum.com/. --~--~-~--

[Rails] Re: using transaction the right way

2009-03-21 Thread Kad Kerforn
Frederick Cheung wrote: > On 21 Mar 2009, at 11:15, Kad Kerforn wrote: > >> >> I wonder if my transaction is well written ? >> I create the user record first , then the issue record (no validation) >> if the user record is valid and saved >> if anything hap

[Rails] using transaction the right way

2009-03-21 Thread Kad Kerforn
I wonder if my transaction is well written ? I create the user record first , then the issue record (no validation) if the user record is valid and saved if anything happen when saving the issue, I want to rollback the user record... def infos_send @franchise = Franchise.scoped_by_mother_of

[Rails] Re: in functional test, assert_redirected_to w prefix

2009-01-20 Thread Kad Kerforn
Kad Kerforn wrote: > I had to use sub-URI deployment (could not use subdomains..), and when > running my functional tests, I the redirected_to assertion embed the > prefix.. quite normal ;-)) > > is there a way to stipulate this prefix in the test setup to avoid > hard-codin

[Rails] in functional test, assert_redirected_to w prefix

2009-01-19 Thread Kad Kerforn
I had to use sub-URI deployment (could not use subdomains..), and when running my functional tests, I the redirected_to assertion embed the prefix.. quite normal ;-)) is there a way to stipulate this prefix in the test setup to avoid hard-coding in all the tests ? Expected response to be a redir

[Rails] Re: Mailer layouts , how to link to a css file

2009-01-15 Thread Kad Kerforn
Hassan Schroeder wrote: > On Thu, Jan 15, 2009 at 3:43 AM, Kad Kerforn > wrote: > >> i would like to link to a css file , .. which king of link ? to >> public/stylesheets/email.css > > Nothing to do with RoR, but you need to provide absolute, complete >

[Rails] Mailer layouts , how to link to a css file

2009-01-15 Thread Kad Kerforn
I can send html emails using the new layouts feature using inline style, there is no problem to get a nice display.. but what if ? i would like to link to a css file , .. which king of link ? to public/stylesheets/email.css if there is any relative image in the css for a background url ? like

[Rails] Re: uninitialized constant ActionVie

2008-12-11 Thread Kad Kerforn
Frederick Cheung wrote: > On 11 Dec 2008, at 15:47, Kad Kerforn wrote: >> active_support/testing/setup_and_teardown.rb:14:in >> `included':NameError: uninitialized constant ActiveSupport::Callbacks >> >> /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib

[Rails] uninitialized constant ActionVie

2008-12-11 Thread Kad Kerforn
Hello I am trying to transform my web app into a 2.2 ready app, in my config/environment.rb I wrote Rails::Initializer.run do |config| . # disabling the surrounding div if validation error ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| if html_tag.include?("cla