What I am trying to do is: I creating a survey website. User can
register to create a survey and this survey can be embedded to other
site with providing embedded script. The problem I have, I don't know
how to create embedded code via ruby on rails. I never done this.
Please help!!!
Thanks,
Y
I had problems most of the afternoon here in the US with gems located
at
rubygems.org. Hopefully will be fixed tomorrow. There's gotta be some
kinda of redundancy/mirroring provided by this site or at least
and indication on the site about the DNS operational status.
- Ricardo
On Jun 8, 8:19 am,
Hi, I want to launch a rails application on godaddy. I purchased a
domain and a hosting plan. I really could not understand from where and
how to start to deploy rails application .
Can anyone please tell how to proceed.
thank you
aashish
--
Posted via http://www.ruby-forum.com/.
--
You rec
With my search forms, I use two partials, one for the controls and one
for the result and then just use a page update to redisplay both
parts.
If you really want a redirect
On Jun 6, 11:25 am, javinto wrote:
> format.js {
> render :action=> search_show, :layout=>false
> }
>
Hi!
I have simple rails application - users with name and avatar and in
sinatra I want to create new user.
form for new user
Name:
Avatar:
My action in sinatra
post '/users/create' do
RestClient.post("http://localhost:3000/users";,
:user=>params['use
Yudi Soesanto wrote:
> Hi guys,
>
> Could you give me a sample or link for creating embedding code in ruby
> on
> rails?
What do you mean by "embedding code"?
>
> Thanks,
> Yudi Soesanto
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
Sent from my iPhone
--
Posted via http
the plugin is...2dc_jqgrid.git
--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrail
Hi guys,
Could you give me a sample or link for creating embedding code in ruby on
rails?
Thanks,
Yudi Soesanto
--
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-t...@googlegroups.com.
To u
Nevermind, I got it... Still couldn't have gotten it without your help.
Thanks.
--
Posted via http://www.ruby-forum.com/.
--
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-t...@googlegroups
Hey thanks for the heads up!
I couldn't figure out what to put in the ENV['GEM_PATH'], I tried
ENV['GEM_PATH']
= '$GEM_HOME:/usr/lib/ruby/gems/1.8' but I was still getting the error.
I used rake gems:unpack in my application and then pushed it onto the server
and that seems to work fine. I'm a li
Not sure how I deluded my self into believing that worked, but it
didn't.
I still can't figure out how to build this query.
Either Google doesn't want to be my friend or I'm asking the wrong
question. Does anyone know of any blogs/tutorials that cover Rails 3
has_many :through queries?
--
You
This is a full time, on-site, contract/hourly gig that lasts at least
12 months in New York City. No telecommuting allowed.
A well funded start up is urgently looking for 2-3 talented developers
with expert knowledge of ROR. This is a long term engagement that can
lead to full time employment, w
Piyush Choudhary wrote:
> try this, if it helps
> http://wiki.github.com/madrobby/scriptaculous/combination-effects-demo
Hi Piyush: I tried that. I can't get it to move down smoothly...
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Goo
Peter De Berdt wrote:
> Downloading a file is a "full page refresh" (although the page won't
> actually refresh). You shouldn't use an AJAX function (whether that's
> a link or a form) to send a file to the client. Just serve it up with
> the right content type as a normal request and you'll be fin
Most likely your application is looking for the gems at the server
level rather than the user level. Here's a KB article from
hostmonster.com describing what you need to do:
http://helpdesk.hostmonster.com/index.php/kb/article/000365
Cheers,
Sheldon Finlay
On Jun 8, 8:20 pm, Ali wrote:
> Hi, I
Hi, I've on hostmonster.com and i've run into a small problem that I
just can't get. When I push my application into my hosting environment
and try to run rake db:migrate, I get an error message from rake
telling me to install the missing gem my environment.rb file has:
config.gem "formtastic"
con
Oh ok. Did not know that. Thanks!
After I got rid of the '@' part they were still returning nil. I had an
attr_accessor :first_name, :last_name defined. Things worked after getting
rid of that. I guess having attr_Accessor with the same names overrides the
method calls or something?
Thanks again!
I added
ActionController::Base.session_options[:secure] = true
to ~/config/environments/production.rb
and now my app sets a different session_id cookie on every request to a
non ssl page, making the session useless.
If my session_id cookie is set by a request to a https page, and I stay
on http
I'm working on an ecommerce site (in Rails 2.3) and I added:
ActionController::Base.session_options[:secure] = true
to ~/config/environments/production.rb
Now, every time I add something to my shopping cart and navigate away I
get a new session_id (which essentially empties my shopping cart).
H
Hassan Schroeder wrote:
On Tue, Jun 8, 2010 at 5:44 AM, MnrKaktus wrote:
The problem I have is that when I open a second, different, rails app
on
one server, the ruby proces crashes.
I've searched google for "EADDRINUSE (Address already in use)" but I
can't f
Do you have the rack -v 1.0.1 gem installed?
On Jun 8, 12:41 pm, anon_comp wrote:
> On Jun 6, 6:10 am, Mike Peltzer wrote:
>
>
>
>
>
> > Hey all, I am just getting started with RoR and am having trouble
> > launching the localhost:3000 page. Here is the error message I am
> > getting in my comma
rakmoh wrote:
> I need to deploy my application to Websphere (WAS) 6.1. Application
> uses threads for some back-groud work. When I deploy the war in WAS, I
> am getting the following error:
You should post this to the JRuby forum instead. You'll probably get
more help there.
--
Posted via http:
I need to deploy my application to Websphere (WAS) 6.1. Application
uses threads for some back-groud work. When I deploy the war in WAS, I
am getting the following error:
[5/3/10 15:56:57:616 EDT] 008f SystemErr R JNDI data source
unavailable: javax.naming.ConfigurationException: A JNDI operati
I don't understand, I've been testing on Firefox and now I am on Safari
and it works...
Someone has an idea why?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email
On 8 June 2010 21:06, Hassan Schroeder wrote:
> On Tue, Jun 8, 2010 at 12:51 PM, Ralph Shnelvar wrote:
>
>> What is all this header and body stuff? I'd really like to understand
>> this.
>
> Start with: http://www.w3.org/Protocols/rfc2616/rfc2616.html
I think that may be a bit heavy for starter
On 8 June 2010 20:45, Steve Russo wrote:
> Colin Law wrote:
>> On 8 June 2010 18:40, Steve Russo wrote:
>>> sure why. �If I do a simple reload/refresh on the browser, the values
>>> within the partials are preserved, but not when a validation error
>>> occurs.
>>>
>>> Any thoughts on what the val
On Tue, Jun 8, 2010 at 12:51 PM, Ralph Shnelvar wrote:
> What is all this header and body stuff? I'd really like to understand
> this.
Start with: http://www.w3.org/Protocols/rfc2616/rfc2616.html
--
Hassan Schroeder hassan.schroe...@gmail.com
twitter: @hassan
--
You
Frederick Cheung wrote:
> On Jun 8, 4:51�pm, Ralph Shnelvar wrote:
>
>>
>> Do you know of any tutorial that explains this header stuff?
>
> Setting headers is pretty easy:
>
> response.headers['X-JSON'] = blah.to_json
>
> And then in your client side code look at the the header and read the
>
> Did you try ...
>
> <%= select( :order, :hcins, [["Man", 3], ["Is", 5]]) %>
>
>
>
> ~Jeremy
yeah I tried and faced with same result.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To pos
Colin Law wrote:
> On 8 June 2010 18:40, Steve Russo wrote:
>> sure why. �If I do a simple reload/refresh on the browser, the values
>> within the partials are preserved, but not when a validation error
>> occurs.
>>
>> Any thoughts on what the validation may be doing that clears the dynamic
>> pa
On Jun 6, 6:10 am, Mike Peltzer wrote:
> Hey all, I am just getting started with RoR and am having trouble
> launching the localhost:3000 page. Here is the error message I am
> getting in my command prompt:
>
> C:\Users\Michael\rubydev\ch04\first>ruby script/server
> C:/Ruby19/lib/ruby/site_ruby
Stanislav Orlenko wrote:
> Hi
> I have a form on View and I have to construct condition for query
> depending fields which user filled in form.
> I should write something like:
>
> cond
> if params[par1]
> cond = " par1 = #{par1} "
>
> if params[par2]
> cond += " AND par2 = #{par2} "
>
NO! N
Hi
I have a form on View and I have to construct condition for query
depending fields which user filled in form.
I should write something like:
cond
if params[par1]
cond = " par1 = #{par1} "
if params[par2]
cond += " AND par2 = #{par2} "
etc
Client.all(:conditions => cond)
May
catz wrote:
> Paperclip.options[:image_magick_path] = "/opt/local/bin"
> Paperclip.options[:command_path] = "/opt/local/bin"
>
> add something like these two commands to paperclip.rb in initializers
> folder
>
> just point to right identify command path
The second one worked. I guess the first
On 8 June 2010 18:40, Steve Russo wrote:
> It seems I have this working using the approach of rendering all of the
> partials and then hiding/displaying the div as needed. I was able to
> get this to partially work in the past with an RJS file using Marnen's
> suggestion of using a separate form
Paperclip.options[:image_magick_path] = "/opt/local/bin"
Paperclip.options[:command_path] = "/opt/local/bin"
add something like these two commands to paperclip.rb in initializers folder
just point to right identify command path
On 6/8/10, Philip Hallstrom wrote:
> Is JPG support compiled into
Philip Hallstrom wrote:
> Is JPG support compiled into Imagemagick?
>
> If you run identify directly on your image does it work? Or complain?
I ran the little test that generates the logo.gif.
jeremywoertink$ /usr/local/bin/convert logo: logo.gif
The logo shows up fine, and I can upload it as m
Is JPG support compiled into Imagemagick?
If you run identify directly on your image does it work? Or complain?
On Jun 8, 2010, at 9:25 AM, Jeremy Woertink wrote:
> I'm using paperclip for uploading images, and I'm running into a weird
> error:
>
>
> 2 errors prohibited this billboard from be
It seems I have this working using the approach of rendering all of the
partials and then hiding/displaying the div as needed. I was able to
get this to partially work in the past with an RJS file using Marnen's
suggestion of using a separate form builder within each of the partials.
This was
Lamer Lamer wrote:
> view
> <%= select( :order, :hcins, { "Man" => 3, "Is" => 5}) %>
> (hcins is string value)
>
> controller (order)
>
> def create
>
> @order =Order.new(params[:order])
>
> @order.user = User.find(session[:user_id])
>
> @order.ucret= @order.hcins.to_d * @order.hboy
>
>
view
<%= select( :order, :hcins, { "Man" => 3, "Is" => 5}) %>
(hcins is string value)
controller (order)
def create
@order =Order.new(params[:order])
@order.user = User.find(session[:user_id])
@order.ucret= @order.hcins.to_d * @order.hboy
if @order.save
redirect_to :controller=>"
On Jun 8, 6:04 pm, catz wrote:
> Frederick thanks It was my mistake. Reopen for Contact was in my project.
>
> I added an error model and forgot. Following code was there
> request_contact.rb file
> class Contact < ActiveRecord::Base
> belongs_to :request
> belongs_to :contact
> ..
>
> Inter
Frederick thanks It was my mistake. Reopen for Contact was in my project.
I added an error model and forgot. Following code was there
request_contact.rb file
class Contact < ActiveRecord::Base
belongs_to :request
belongs_to :contact
..
Interesting moment here is that this reopening doesn't ap
I'm using paperclip for uploading images, and I'm running into a weird
error:
2 errors prohibited this billboard from being saved
There were problems with the following fields:
* Image
/var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not
recognized by the 'identify' command
Hi Tim,
If you are using Fedora try following command in terminal:
console$> ps -fu
USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND
user 3429 0.0 0.0 5072 1672 pts/1Ss Jun08 0:00 bash
user 15217 2.0 0.0 4628 908 pts/1R+ 03:17 0:00 \_ ps -fu
On Tue, Jun 8, 2010 at 5:44 AM, MnrKaktus wrote:
> The problem I have is that when I open a second, different, rails app
> on
> one server, the ruby proces crashes.
> I've searched google for "EADDRINUSE (Address already in use)" but I
> can't find a solution..
Seriously? It means exactly what
On Jun 8, 4:51 pm, Ralph Shnelvar wrote:
>
> Do you know of any tutorial that explains this header stuff?
Setting headers is pretty easy:
response.headers['X-JSON'] = blah.to_json
And then in your client side code look at the the header and read the
JSON (prototype will do this for you, jque
Frederick Cheung wrote:
> On Jun 8, 3:56�pm, Ralph Shnelvar wrote:
>> Frederick Cheung wrote:
>> > On Jun 8, 3:00 pm, Ralph Shnelvar wrote:
>
>> Fred:
>>
>> Ok ... lets say I have two variables ABC and XYZ and I want to send the
>> values of those two variables back to my jQuery code ...
>>
>> W
I am trying to rename a bundle name
I got a textarea box with row size 3 column size 40
but I need a small text box
Please help me
<%= in_place_editor('edit_title_bundle'+bundle.id.to_s, :url =>
update_field_newsfeeds_path(:id => bundle.id, :name =>'category'), :rows
=> 2 , :size => 50 , :save_te
Thanks everyone. Makes sense. Better to build validation logic once
in the model than try to add redundant code across controllers.
I wanted to ask before I started off on a bad path.
Mark
On Jun 8, 4:58 am, Marnen Laibow-Koser wrote:
> MarkB wrote:
> > As I prepare to add validations to my a
Klaus-dieter Gundermann wrote:
> Michael Pavling wrote:
>> Not specifically a Rails problem; but is anyone else having problems
>> accessing http://rubygems.org or installing gems?
>>
>> It's not working for me from my home internet (in the UK), internet on
>> my phone, or a VM in Chicago...
>>
>
On Jun 8, 3:56 pm, Ralph Shnelvar wrote:
> Frederick Cheung wrote:
> > On Jun 8, 3:00 pm, Ralph Shnelvar wrote:
> Fred:
>
> Ok ... lets say I have two variables ABC and XYZ and I want to send the
> values of those two variables back to my jQuery code ...
>
> What's the magic invocation to do tha
The association name changed from :globalize_translations to
:translations. Maybe is this is your problem?
--
Posted via http://www.ruby-forum.com/.
--
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 ru
Frederick Cheung wrote:
> On Jun 8, 3:00�pm, Ralph Shnelvar wrote:
>> Could someone please demonstrate the code to send both json (or xml) AND
>> javascript (to be executed) in a single Ajax request?
>>
>
> Assuming you mean sending that as the response to an ajax request
>
> If you set the
Definitely not. The project is the same. I'm just git push it. o.k
i'll dig into prod vs dev mode and try to see the difference. Anyway
thanks a lot for your attention.
On 6/8/10, Frederick Cheung wrote:
>
>
> On Jun 8, 1:37 pm, Roman Catz wrote:
>
>>
>> There are different numbers of methods. W
The answer is
Continent.find(params[:product]["continent_id"])
in more Steps
first=params[:product]
second=first["continent_id"]
Continent.find(secon)
May be there is a better way as well but any way it works finally.
thanks to for Helping to get on the right way!
Markus Wellmann wrote:
in def
Frederick Cheung wrote:
> On Jun 8, 10:15�am, Greg Ma wrote:
>
>>
>> Yes I have check the log and it doesn't help. I logged each step and I
>> confirm that it is not an Ajax request...
>>
> Rails looks at the X-Requested-With header to see if a request was an
> ajax one. Prototype, jquery etc. se
On Jun 8, 3:00 pm, Ralph Shnelvar wrote:
> Could someone please demonstrate the code to send both json (or xml) AND
> javascript (to be executed) in a single Ajax request?
>
Assuming you mean sending that as the response to an ajax request
If you set the X-JSON header to be a json fragmen
Could someone please demonstrate the code to send both json (or xml) AND
javascript (to be executed) in a single Ajax request?
Is this even possible?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" gro
Michael Pavling wrote:
> On 7 June 2010 20:42, Yanni Mac wrote:
>> class ShirtProduct < ActiveRecord::Base
>> end
>>
>> class PantsProduct < ActiveRecord::Base
>> end
>
> And have you *really* designed to have a different table for different
> types of product? I can only imagine lots of pain tha
Marnen Laibow-Koser wrote:
> OK, apparently we're not hearing each other. Gitosis setup is simple,
> and it gives you a ridiculously easy way of managing users' keys. Even
> for my solo freelance business, I can't imagine *not* using Gitosis.
> When you have two users -- and if you have Cap, y
Frederick Cheung wrote:
> On Jun 8, 2:21�pm, Max Williams wrote:
>
>> > Fred
>>
>> In this case, i have a page which loads a partial twenty times. �Each
>> partial calls a method on the user object (current_user as it happens)
>> which inspects its associated role object. So, if i don't eager loa
Hello everyone,
I'm new here, and I wasn't sure where to put this question.
So forgive me if this is the wrong place.
The problem I have is that when I open a second, different, rails app
on
one server, the ruby proces crashes. When I checkout the ruby process
this is the loop it hangs in:
rt_si
On Jun 8, 2:21 pm, Max Williams wrote:
> > Fred
>
> In this case, i have a page which loads a partial twenty times. Each
> partial calls a method on the user object (current_user as it happens)
> which inspects its associated role object. So, if i don't eager load,
> then the role gets loaded
On 8 June 2010 14:21, Max Williams wrote:
>
> In this case, i have a page which loads a partial twenty times. Each
> partial calls a method on the user object (current_user as it happens)
> which inspects its associated role object. So, if i don't eager load,
> then the role gets loaded twenty ti
On 8 June 2010 13:56, Marnen Laibow-Koser wrote:
> pepe wrote:
>> On Jun 8, 3:10�am, Michael Pavling wrote:
>>> ��def full_name
>>> �� �[first_name, last_name].join(" ")
>>> ��end
>>>
>>> ...now, if you're missing a first or last name, you don't get extra
>>> white-space padding
>
> Actually, I b
Marnen Laibow-Koser wrote:
> You're trying to pass a symbol instead of a variable into your query
> string, so of course it won't work. What you want is
> ["id = ?", continent_id.to_i] (without the colon).
>
> But you should never need to do it this way. For a simple equality
> check, use the
Frederick Cheung wrote:
> On Jun 8, 12:09�pm, Max Williams wrote:
>> Frederick Cheung wrote:
>> > One addition - it's pointless doing this unless you have more than 1
>> > user object - it won't be any faster
>>
>> > Fred
>>
>> Thanks fred - that works. �Faster than what, though? �Than my approach
It looks like you are right Fred, the code doesn't actually handle a
mixture of strings and associations. I found the following patch to
fix the problem:
http://groups.google.ca/group/rubyonrails-core/browse_thread/thread/50339b16ca736500
Thanks,
neufelni
On Jun 7, 12:11 pm, Frederick Cheung
wro
pepe wrote:
> On Jun 8, 3:10�am, Michael Pavling wrote:
>> ��def full_name
>> �� �[first_name, last_name].join(" ")
>> ��end
>>
>> ...now, if you're missing a first or last name, you don't get extra
>> white-space padding
Actually, I believe you do, unless you compact the array first (posting
f
On Jun 8, 1:37 pm, Roman Catz wrote:
>
> There are different numbers of methods. Why? What are the methods
> contact and contact= for Contact class?
Are you re-opening the Contact class anywhere? Is the difference local
versus heroku or development versus production mode (in production
mode al
On Jun 8, 12:09 pm, Max Williams wrote:
> Frederick Cheung wrote:
> > One addition - it's pointless doing this unless you have more than 1
> > user object - it won't be any faster
>
> > Fred
>
> Thanks fred - that works. Faster than what, though? Than my approach?
compared to not eagerloading
Markus Wellmann wrote:
> You are right there was a typo but didn't change anything.
> to make sure I tried :id.to_i witch brings 3049 instead of 1
>
>>> -:first, :conditions => [ "id = ?",:continend_id.to_i ]) //the same then
>>
You're trying to pass a symbol instead of a variable into your que
Here is some additional notes:
If anybody know please explain:
class Contact < ActiveRecord::Base
belongs_to :user
belongs_to :contact_type, :class_name => "ContactType", :foreign_key
=> "contact_type_id"
has_many :request_contacts, :dependent => :destroy
has_many :requests, :through => :
Hi,
I solved the issue.
I forgot to install "mysql-delop" client.
My problem I was working on windows since last 2 years. I moved to linux
now and I am facing lot of problem for installation. I don't why the
installation process for platforms is different as well as cumbersome to
install.
Anyon
You are right there was a typo but didn't change anything.
to make sure I tried :id.to_i witch brings 3049 instead of 1
>> -:first, :conditions => [ "id = ?",:continend_id.to_i ]) //the same then
>
> Are you sure it's not just a typo?
>
> continend_id vs continent_id
--
Posted via http://www.r
Michael Pavling wrote:
> Not specifically a Rails problem; but is anyone else having problems
> accessing http://rubygems.org or installing gems?
>
> It's not working for me from my home internet (in the UK), internet on
> my phone, or a VM in Chicago...
>
> Having not seen anyone complaining abo
MarkB wrote:
> As I prepare to add validations to my application, I am trying to
> decide if it would be better to write validation logic in the update/
> create controller methods or use Rails' validation methods.
Use Rails' validation methods. Logic like that does not belong in the
controller.
Hi Marcus,
On Tue, Jun 8, 2010 at 6:39 AM, Markus Wellmann wrote:
> Thanks for your answer.
You're welcome.
> -:first, :conditions => [ "id = ?",:continend_id.to_i ]) //the same then
Are you sure it's not just a typo?
continend_id vs continent_id
Best regards,
Bill
--
You received this mes
Thanks for your answer.
I tried already:
:params[:continent_id] //Error: Couldn't find Continent with ID=0
the problem is that :continent_id is the foreign key in products and i'm
looking for the :id in continents which is the same then :continent_id
I also tried to use:
-:params[:continent_id]
Thx a lot , that's true , it just was my mistake ...
:o
> You shouldn't need to - as long as you use date_select (with the
> attribute name birthdate) and then pass that into User.new (or
> User.update_attributes etc.) activerecord will do the work of sticking
> the individual parameters back toge
Not specifically a Rails problem; but is anyone else having problems
accessing http://rubygems.org or installing gems?
It's not working for me from my home internet (in the UK), internet on
my phone, or a VM in Chicago...
Having not seen anyone complaining about it this morning makes me
wonder if
Yes of course, currently it looks like
validates_presence_of :contact_type_id
validates_associated :contact_type
I insert some debug on the view and get something: please look into
it :)
<% form_for(@contact) do |f| %>
<%= debug(@contact) %>
The difference here is under
changed_attribute
Frederick Cheung wrote:
> One addition - it's pointless doing this unless you have more than 1
> user object - it won't be any faster
>
> Fred
Thanks fred - that works. Faster than what, though? Than my approach?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
Hi Ma We,
On Tue, Jun 8, 2010 at 5:23 AM, Ma We wrote:
> The parameters of my update are looking like this:
> Parameters: {"commit"=>"Update", "action"=>"update", "_method"=>"put",
> "authenticity_token"=>"***", "product"=>{"image_url"=>"w.jpg",
> "expirience_points"=>"0", "price"=>"1", "title"=
On Jun 8, 10:59 am, Roman Catz wrote:
> Thanks Frederick, but I still do not understand what's going on here.
>
> I changed this line to belongs_to :contact_type ..
> The result is the same.
Did you also change the validates_presence_of :type ?
Fred
>
> Controller was generated as standart s
On Jun 8, 10:43 am, Tushar Gandhi wrote:
> Hi,
> I have mysql installed on linux. Whenever I am trying t
> "gem install mysql -- --with-mysql-dir=/usr/bin/mysql"
> I am getting following error:-
>
Do you have the mysql header files ?
Fred
--
You received this message because you are subscribe
On Jun 8, 11:41 am, Frederick Cheung
wrote:
> On Jun 8, 11:25 am, Max Williams wrote:
> then you can do
>
> User.preload_associations [user1, user2, user3], :role
>
One addition - it's pointless doing this unless you have more than 1
user object - it won't be any faster
Fred
--
You received t
On Jun 8, 11:25 am, Max Williams wrote:
> Max Williams wrote:
> > Let's say that i have a User object in @user, already loaded. I want
> > to constantly refer to @user.role on a particular page (where User
> > belongs_to :role), so i want to 'eager load' the role association.
>
> > For the sak
Hi,
I am also getting same error. I tried all options but still error is
there.
Can anyone point me to correct answer?
I don't why the rails have this much of trouble.
Thanks,
Tushar
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
Max Williams wrote:
> Let's say that i have a User object in @user, already loaded. I want
> to constantly refer to @user.role on a particular page (where User
> belongs_to :role), so i want to 'eager load' the role association.
>
> For the sake of argument, let's say i wasn't able to do this in
Hi I want to assign continents to my products with a drop down box.
I managed to get everyting runing but now i have a probably quite easy
to solve problem.
I don't get the update running.
What want to do is basically:
SELECT * FROM "continents" WHERE ("continents"."id" = "continent_id")
LIMIT 1
Thanks Frederick, but I still do not understand what's going on here.
I changed this line to belongs_to :contact_type ..
The result is the same.
Controller was generated as standart scaffold.
def create
@contact = Contact.new(params[:contact].merge(:user =>
current_user))
respond_to do |forma
Let's say that i have a User object in @user, already loaded. I want
to constantly refer to @user.role on a particular page (where User
belongs_to :role), so i want to 'eager load' the role association.
For the sake of argument, let's say i wasn't able to do this in the
normal way (ie with the :
unfortunately the tests didn't find the routes:
1) Error:
test_should_get_about(PageControllerTest):
ActionController::RoutingError: No route matches {:action=>"about",
:controller=>"page"}
/test/functional/page_controller_test.rb:5:in `test_should_get_about'
$ rake routes RAILS_ENV=test
Hi,
I have mysql installed on linux. Whenever I am trying t
"gem install mysql -- --with-mysql-dir=/usr/bin/mysql"
I am getting following error:-
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local
Frederick Cheung wrote:
> Rails looks at the X-Requested-With header to see if a request was an
> ajax one. Prototype, jquery etc. set this header, but if phonegap
> doesn't then rails won't consider it to be an ajax request
>
> Fred
I'm not making the Ajax query with phonegap but with prototype
I works now, but I had to add the following to my config/route.rb
---
require 'arel'
require 'active_model'
require 'active_model/observing'
Otherwise my route got added but no route at all will work.
app.get('/page/about') AND app.get('/') resulted in unintialized constants
On Jun 8, 10:15 am, Greg Ma wrote:
>
> Yes I have check the log and it doesn't help. I logged each step and I
> confirm that it is not an Ajax request...
>
Rails looks at the X-Requested-With header to see if a request was an
ajax one. Prototype, jquery etc. set this header, but if phonegap
doe
Colin Law wrote:
> On 8 June 2010 09:20, Greg Ma wrote:
>> false params[:id].present?
>> {
>> �method: 'get',
>> �onComplete: function(transport){alert('kikoo');}
>> }
>> );
>>
>> I have two problem with this code, the first one is that it doesn't
>> recognize that I am making an Ajax request beca
1 - 100 of 112 matches
Mail list logo