I have a Shop model that has_many Zones (a Zone assigns different pricing to products). I want to save a default Zone for a Shop. This is what I have in my Shop class: has_one :default_zone, :class_name => "Zone" After that, however, I am a bit lost. I know I can manually set shop.default_zone_id to a zone.id, but I would imagine a better system of doing this exists. Thanks, Angelo, a desperate man -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
OK, I got rid of all the syntax errors. The vendor_drop list is now hidden on startup of the view I switched from an image to a button However, the drop list does not get displayed when the ShowList button is clicked Code is below. Ideas are most welcome <%= button_to_function("ShowList", %<page["vendor_droplist"].show> ) %> <br> <div id="vendor_droplist", style="display:none"> <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname }), {:multiple => true} %> </div>
On Mar 21, 12:37 am, RichardOnRails <RichardDummyMailbox58...@USComputerGurus.com> wrote: > I think I improved two things in the version of lines 20-26 below: > 1. I gave the div an id rather than a name > 2. I gave the div a style of "display:none" so that it's hidden at > every startup of the view > > <%# = image_tag "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } %> > <br> > <div id="vendor_droplist", style="display:none"> > <%= select_tag "test", > options_for_select(@current_vendors.collect { |v| > v.nickname }), > {:multiple => true} %> > </div> > > On Mar 21, 12:07 am, RichardOnRails > > <RichardDummyMailbox58...@USComputerGurus.com> wrote: > > Hi, > > > I've got the following code in my attempt to provide the subject > > functionality, lines 20-29 in view: > > > <%= image_tag "DownArrow.jpg" options = > > { onclick=page["vendor_droplist"].show } %> > > <br> > > <div name="vendor_droplist"> > > <%= select_tag "test", > > options_for_select(@current_vendors.collect { |v| > > v.nickname }), > > {:multiple => true} %> > > </div> > > > Until I put in the options on image tag and added the div, this code > > display a list of vendor nicknames. Now I have several problems: > > > 1. Syntax error in line 20 where an identifier was encountered where a > > right-paren was expected (see below) > > 2. I don't know how to make the vendor_droplist initially hidden > > > I've Googled for "Rails Ajax toggled item" and got a number of hits > > but no apparent answer. I'll keep poking around the Web, but I > > appreciate some suggestion(s). > > > Thanks in advance, > > Richard > > > Showing app/views/expenses/new.html.erb where line #20 raised: > > > compile error > > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > > new.html.erb:20: syntax error, unexpected tIDENTIFIER, expecting ')' > > @output_buffer.concat " "; @output_buffer.concat(( image_tag > > "DownArrow.jpg" options = > > { onclick=page["vendor_droplist"].show } ).to_s); > > @output_buffer.concat "\n" > > > ^ > > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > > new.html.erb:20: odd number list for Hash > > @output_buffer.concat " "; @output_buffer.concat(( image_tag > > "DownArrow.jpg" options = > > { onclick=page["vendor_droplist"].show } ).to_s); > > @output_buffer.concat "\n" > > > ^ > > > Extracted source (around line #20): > > > 17: <p> > > 18: <%= f.label :vendor %><br /> > > 19: <%= f.text_field :vendor %> > > 20: <%= image_tag "DownArrow.jpg" options = > > { onclick=page["vendor_droplist"].show } %> > > 21: <br> > > 22: <div name="vendor_droplist"> > > 23: <%= select_tag "test", > > > Trace of template inclusion: app/views/expenses/new.html.erb > > > RAILS_ROOT: K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS > > Application Trace | Framework Trace | Full Trace > > > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > > new.html.erb:59:in `compile!' > > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/controllers/ > > expenses_controller.rb:30:in `new'
-- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I think I improved two things in the version of lines 20-26 below: 1. I gave the div an id rather than a name 2. I gave the div a style of "display:none" so that it's hidden at every startup of the view <%# = image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } %> <br> <div id="vendor_droplist", style="display:none"> <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname }), {:multiple => true} %> </div> On Mar 21, 12:07 am, RichardOnRails <RichardDummyMailbox58...@USComputerGurus.com> wrote: > Hi, > > I've got the following code in my attempt to provide the subject > functionality, lines 20-29 in view: > > <%= image_tag "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } %> > <br> > <div name="vendor_droplist"> > <%= select_tag "test", > options_for_select(@current_vendors.collect { |v| > v.nickname }), > {:multiple => true} %> > </div> > > Until I put in the options on image tag and added the div, this code > display a list of vendor nicknames. Now I have several problems: > > 1. Syntax error in line 20 where an identifier was encountered where a > right-paren was expected (see below) > 2. I don't know how to make the vendor_droplist initially hidden > > I've Googled for "Rails Ajax toggled item" and got a number of hits > but no apparent answer. I'll keep poking around the Web, but I > appreciate some suggestion(s). > > Thanks in advance, > Richard > > Showing app/views/expenses/new.html.erb where line #20 raised: > > compile error > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > new.html.erb:20: syntax error, unexpected tIDENTIFIER, expecting ')' > @output_buffer.concat " "; @output_buffer.concat(( image_tag > "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } ).to_s); > @output_buffer.concat "\n" > > ^ > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > new.html.erb:20: odd number list for Hash > @output_buffer.concat " "; @output_buffer.concat(( image_tag > "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } ).to_s); > @output_buffer.concat "\n" > > ^ > > Extracted source (around line #20): > > 17: <p> > 18: <%= f.label :vendor %><br /> > 19: <%= f.text_field :vendor %> > 20: <%= image_tag "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } %> > 21: <br> > 22: <div name="vendor_droplist"> > 23: <%= select_tag "test", > > Trace of template inclusion: app/views/expenses/new.html.erb > > RAILS_ROOT: K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS > Application Trace | Framework Trace | Full Trace > > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > new.html.erb:59:in `compile!' > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/controllers/ > expenses_controller.rb:30:in `new'
-- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I think I corrected the div by: 1. giving it an id rather than a name 2. adding display:none to start it off hidden as follows: <%# = image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } %> <br> <div id="vendor_droplist", style="display:none"> <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname }), {:multiple => true} %> </div> On Mar 21, 12:07 am, RichardOnRails <RichardDummyMailbox58...@USComputerGurus.com> wrote: > Hi, > > I've got the following code in my attempt to provide the subject > functionality, lines 20-29 in view: > > <%= image_tag "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } %> > <br> > <div name="vendor_droplist"> > <%= select_tag "test", > options_for_select(@current_vendors.collect { |v| > v.nickname }), > {:multiple => true} %> > </div> > > Until I put in the options on image tag and added the div, this code > display a list of vendor nicknames. Now I have several problems: > > 1. Syntax error in line 20 where an identifier was encountered where a > right-paren was expected (see below) > 2. I don't know how to make the vendor_droplist initially hidden > > I've Googled for "Rails Ajax toggled item" and got a number of hits > but no apparent answer. I'll keep poking around the Web, but I > appreciate some suggestion(s). > > Thanks in advance, > Richard > > Showing app/views/expenses/new.html.erb where line #20 raised: > > compile error > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > new.html.erb:20: syntax error, unexpected tIDENTIFIER, expecting ')' > @output_buffer.concat " "; @output_buffer.concat(( image_tag > "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } ).to_s); > @output_buffer.concat "\n" > > ^ > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > new.html.erb:20: odd number list for Hash > @output_buffer.concat " "; @output_buffer.concat(( image_tag > "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } ).to_s); > @output_buffer.concat "\n" > > ^ > > Extracted source (around line #20): > > 17: <p> > 18: <%= f.label :vendor %><br /> > 19: <%= f.text_field :vendor %> > 20: <%= image_tag "DownArrow.jpg" options = > { onclick=page["vendor_droplist"].show } %> > 21: <br> > 22: <div name="vendor_droplist"> > 23: <%= select_tag "test", > > Trace of template inclusion: app/views/expenses/new.html.erb > > RAILS_ROOT: K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS > Application Trace | Framework Trace | Full Trace > > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ > new.html.erb:59:in `compile!' > K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/controllers/ > expenses_controller.rb:30:in `new'
-- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
In a Rails 2.x validation to check if the name of some model is unique within a some category, I would use: `validates_uniqueness_of :name, :scope => :category_id` In Rails 3, this is replaced with: `validates :name, :uniqueness => true` However, I can't seem to find a method of defining the uniqueness' scope. Am I missing something? Thanks, Angelo -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi, I've got the following code in my attempt to provide the subject functionality, lines 20-29 in view: <%= image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } %> <br> <div name="vendor_droplist"> <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname }), {:multiple => true} %> </div> Until I put in the options on image tag and added the div, this code display a list of vendor nicknames. Now I have several problems: 1. Syntax error in line 20 where an identifier was encountered where a right-paren was expected (see below) 2. I don't know how to make the vendor_droplist initially hidden I've Googled for "Rails Ajax toggled item" and got a number of hits but no apparent answer. I'll keep poking around the Web, but I appreciate some suggestion(s). Thanks in advance, Richard Showing app/views/expenses/new.html.erb where line #20 raised: compile error K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ new.html.erb:20: syntax error, unexpected tIDENTIFIER, expecting ')' @output_buffer.concat " "; @output_buffer.concat(( image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } ).to_s); @output_buffer.concat "\n" ^ K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ new.html.erb:20: odd number list for Hash @output_buffer.concat " "; @output_buffer.concat(( image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } ).to_s); @output_buffer.concat "\n" ^ Extracted source (around line #20): 17: <p> 18: <%= f.label :vendor %><br /> 19: <%= f.text_field :vendor %> 20: <%= image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } %> 21: <br> 22: <div name="vendor_droplist"> 23: <%= select_tag "test", Trace of template inclusion: app/views/expenses/new.html.erb RAILS_ROOT: K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS Application Trace | Framework Trace | Full Trace K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/views/expenses/ new.html.erb:59:in `compile!' K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/app/controllers/ expenses_controller.rb:30:in `new' -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hail Caesars! I have the following text entry field in my view: <%= text_field :order, :company_name %> However, company_name doesn't really reside in the orders table. It resides in the "company" table, which belongs to order, as follows: Order.company.company_name. This is where my controller method correctly saves it to. I added the company_name field to my orders table as a temporary measure so I wouldn't get a method not found error. Companies belong to orders and each order has one company. How can I change ":company_name" in my text_field helper to correctly reflect the correct relationship between Orders and companies (that is, Order.company.company_name instead of order[company_name] )? Companies belonging to orders, rather than orders belonging to companies, is correct for the business logic of this application. Thanks in advance for your help. -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I figured out what was going on. I had defined a routes.yml to translate the routes and into this file I had a key "services: Services". So, it was overwriting the value of a services key (with children keys) that I had defined into another file. Thanks. On Sat, Mar 20, 2010 at 11:35 PM, Rodrigo Felix <rodrigofelix@ufc.br> wrote: Does anybody know if the word "services" can be a key into a i18n file? If I use "service" I can get the value, but when I use "services" a translation_mission error is showed. Really weird. On Fri, Mar 19, 2010 at 6:34 PM, Rodrigo Felix <rodrigofelixdealmeida@gmail.com> wrote: Has anybody faced any problem to use i18n on Rails 2.3.5? Sometimes when I call the t function, it works fine, but for some keys, it does not work and I have no clue why it is going on.
I do have a .yml with correct keys and values. For example, in this (http://dev.promine.com.br/promine) page, i18n is working properly, but in this (http://dev.promine.com.br/servicos) one, it isn't? Any suggestion about what is happening? Thanks in advance. Rodrigo Felix -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Does anybody know if the word "services" can be a key into a i18n file? If I use "service" I can get the value, but when I use "services" a translation_mission error is showed. Really weird. On Fri, Mar 19, 2010 at 6:34 PM, Rodrigo Felix <rodrigofelixdealmeida@gmail.com> wrote: Has anybody faced any problem to use i18n on Rails 2.3.5? Sometimes when I call the t function, it works fine, but for some keys, it does not work and I have no clue why it is going on.
I do have a .yml with correct keys and values. For example, in this (http://dev.promine.com.br/promine) page, i18n is working properly, but in this (http://dev.promine.com.br/servicos) one, it isn't? Any suggestion about what is happening? Thanks in advance. Rodrigo Felix -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
:readonly => true was the perfect solution for this problem! Thanks! For future readers' reference, the text_field now looks like this: <%= text_field "invoice", "due_date", :readonly => true, :class => 'textbox' %> This allows the visitor to see the field's content, but not edit it. On Mar 20, 9:02 pm, Hassan Schroeder <hassan.schroe...@gmail.com> wrote: > On Sat, Mar 20, 2010 at 11:52 AM, Joshua Martin <josmar52...@gmail.com> wrote: > > The text_field should be disabled so that the user can't put it a > > random date without regard to the terms or invoice date. > > > However, adding the :disabled attribute to the text_field, or adding > > the disabled attribute via JQuery results in the value not being saved > > when the invoice is created. > > > How can I make the value of the disabled text_field be recorded during > > the @invoice.save? > > You can't because, by definition, a disabled control cannot be > successful: > > <http://www.w3.org/TR/html401/interact/forms.html#adef-disabled> > > What you probably want to use is "readonly", defined immediately > following the above entry... > > -- > Hassan Schroeder ------------------------ hassan.schroe...@gmail.com > twitter: @hassan -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi Joshua, Thanks for your response. > Can you not use an <%= image_tag("DownArrow.jpg") %> Yes. That's essentially what I wound up with: <%= image_tag "DownArrow.jpg" %> My problem was that I had tried <%= f.image_tag "DownArrow.jpg" %> and then <%= f.image "DownArrow.jpg" %>. Colin pointed out the plain image_tag without the "f." is what I needed. Best wishes, Richard On Mar 20, 3:02 pm, Joshua Martin <josmar52...@gmail.com> wrote: > Can you not use an <%= image_tag("DownArrow.jpg") %> ? > > On Mar 20, 2:29 pm, RichardOnRails > > <RichardDummyMailbox58...@USComputerGurus.com> wrote: > > Hi, > > > I've got a public\images\DownArrow.jpg > > and app\views\expenses\new.html.erb that want to present this image in > > the following context: > > > <p> > > <%= f.label :vendor %><br /> > > <%= f.text_field :vendor %> > > <%= f.image "DownArrow.jpg" %> > > <br> > > <%= select_tag "test", > > options_for_select(@current_vendors.collect { |v| v.nickname }), > > {:multiple => true} %> > > </p> > > > But Rails gushes the unforgiving response: > > undefined method `image' for #<ActionView::Helpers::FormBuilder: > > 0x48194e0> > > > I couldn't find anything helpful in: > > --http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html > > --http://api.rubyonrails.org/http://api.rubyonrails.org/ > > -- Google > > > Any ideas? > > > Thanks in Advance, > > Richard -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
So I've written my first real-world RoR app and I'm now getting ready to deploy it. Unfortunately, my client decided to use GoDaddy as the hosting provider and based on what I've seen so far from the web, it's not really the smoothest or ideal hosting for RoR apps. There were several posts here that I tried to follow but they were kinda old (2008, 2007). Most of them are talking about the dispatch.fcgi being in the public folder. Well I tried searching my app for those and I found them in the 'vendor\rails\railties\dispatches\' folder instead. I am hoping you folks have recently experienced deploying an app to GoDaddy. I followed the instructions and have already attempted it 3 times and I still could not get my app to show. I kept getting 'Page Not Found'. I'm not sure with what's supposed to be in my .htaccess file for ruby app. Here's what I have right now for .htaccess. RewriteEngine On RewriteRule !/public/dispatch.fcgi [QSA,L] +++++++++++++++++++++++++++++++ Here's dispatch.fcgi : #!/usr/local/bin/ruby RewriteBase /access RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] require File.dirname(__FILE__) + "/../config/environment" require 'fcgi_handler' RailsFCGIHandler.process! +++++++++++++++++++++++++++++++ Here's what my environment.rb looks like: # Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present #RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION RAILS_GEM_VERSION = '1.1.6' unless defined? RAILS_GEM_VERSION ENV['GEM_HOME'] = '/usr/local/lib/ruby/gems-dev/1.8' # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| config.time_zone = 'UTC' end +++++++++++++++++++++++++++++++++ I'm not sure what else I'm missing. I used the GoDaddy CGI Admin to create the rails directory where I uploaded my project. This also generated the .htaccess file.
I'd appreciate all the help and advice I can get. Thanks. -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
On Sat, Mar 20, 2010 at 11:52 AM, Joshua Martin < josmar52789@gmail.com> wrote: > The text_field should be disabled so that the user can't put it a > random date without regard to the terms or invoice date. > > However, adding the :disabled attribute to the text_field, or adding > the disabled attribute via JQuery results in the value not being saved > when the invoice is created. > > How can I make the value of the disabled text_field be recorded during > the @invoice.save? You can't because, by definition, a disabled control cannot be successful: <http://www.w3.org/TR/html401/interact/forms.html#adef-disabled> What you probably want to use is "readonly", defined immediately following the above entry... -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com twitter: @hassan -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I'm having the same "uninitialized constant MysqlCompat::MysqlRes" problem. Here is my configuration: OS X 10.6.2 Rails 2.3.5 5.5.0-m2 MySQL Community Server ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0] -Rahil On Mar 19, 9:39 pm, Yudi Soesanto <soesa...@gmail.com> wrote: > Jose, > > Uninstall gem mysql first (*sudo gem uninstall mysql*) and then install it > again with this command: > > $ sudo gem install mysql -- --with-mysql-config=/usr/bin/mysql_config > > *for reference:* > Check on this linkhttp://wiki.rubyonrails.org/database-support/mysql, maybe > it can help. > > If it still doesn't work, try to reinstall mysql server. > > Good luck, > > Yudi Soesanto > > 2010/3/20 José Luis Romero <tangu...@gmail.com> > > > *mysql --version > > mysql Ver 14.14 Distrib 5.1.44, for redhat-linux-gnu (i386) using > > readline 5.1 > > > *rails -v > > Rails 2.3.5 > > > On Mar 19, 4:19 am, Yudi Soesanto <soesa...@gmail.com> wrote: > > > Jose, > > > > What rails version and mysql version are you using? > > > Do this: > > > *rails -v* > > > *mysql --version* > > > > I have the same issue as your after I upgraded to rails 2.2.2 and > > finally, I > > > got it work > > > What I did, I reinstall mysql and it worked ok now. > > > > Yudi Soesanto > > > > 2010/3/18 José Luis Romero <tangu...@gmail.com> > > > > > On Mar 18, 12:36 am, Conrad Taylor <conra...@gmail.com> wrote: > > > > > José, can you verify that MySQL is running by doing the following: > > > > > > $ mysql -u<username> > > > > > Yes it's running... > > > > > -- > > > > 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@googlegroups.com > > . > > > > To unsubscribe from this group, send email to > > > > rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com> > > <rubyonrails-talk%2Bunsubscribe@googlegroups.com<rubyonrails-talk%252Bunsubscribe@googlegroups.com> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > 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@googlegroups.com. > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.
-- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Abraham Tio wrote: >> cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 >> gem install mysql -- >> --with-mysql-config=/usr/local/mysql/bin/mysql_config >> Greg Donald >> http://destiney.com/> > YUP. this works. newbie question... I was able to get an error free install on OSX Leopard 10.6.2 with the following. The first cds to the mysql gem location of my Leopard install (may differ for others): cd /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 sudo gem install mysql --no-rdoc --no-ri -- --with-mysql-config=/usr/local/mysql/bin/mysql_config There were many "No definition for..." RDoc and Ri errors otherwise. Just starting my first Ruby project... and not so comfortable with this install of the mysql gem. I expect there's possibly serious ramifications of excluding these two processes. Can anybody tell us what are we missing by resorting to these install parameters; and/or how can we install with ri and rdoc successfully? tia m -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi Colin, > I think that should be > <%= image_tag "DownArrow.jpg" %> I tried that once merely changing f.image to f.image_tag, which I had tried earlier. Happily, then I noticed that you also omitted the "f.". So you were spot-on! Great job! I superficially thought that all the things in the block had to be f.xxx or generated html would be out of order, or something. Now I realize the html is generated in the order its created, regardless of what method is invoked to create it. At least, that's how I'm thinking about it now. BTW, the rest of that code in that section is: <p> <%= f.label :vendor %><br /> <%= f.text_field :vendor %> <%= image_tag "DownArrow.jpg" %> <br> <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname }), {:multiple => true} %> </p> So I no longer need the sidebar I could never get working. The select_tag was what I really wanted, but I didn't go about seeking properly for a week. Whew, I'm glad that's behind me. Best wishes, Richard On Mar 20, 5:09 pm, Colin Law <clan...@googlemail.com> wrote: > On 20 March 2010 18:29, RichardOnRails > > <RichardDummyMailbox58...@uscomputergurus.com> wrote: > > Hi, > > > I've got a public\images\DownArrow.jpg > > and app\views\expenses\new.html.erb that want to present this image in > > the following context: > > > <p> > > <%= f.label :vendor %><br /> > > <%= f.text_field :vendor %> > > <%= f.image "DownArrow.jpg" %> > > I think that should be > <%= image_tag "DownArrow.jpg" %> > > Colin > > > <br> > > <%= select_tag "test", > > options_for_select(@current_vendors.collect { |v| v.nickname }), > > {:multiple => true} %> > > </p> > > > But Rails gushes the unforgiving response: > > undefined method `image' for #<ActionView::Helpers::FormBuilder: > > 0x48194e0> > > > I couldn't find anything helpful in: > > --http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html > > --http://api.rubyonrails.org/http://api.rubyonrails.org/ > > -- Google > > > Any ideas? > > > Thanks in Advance, > > Richard > > > -- > > 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@googlegroups.com. > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Actually I figured out a better way. Since everytime you hit restart in the passenger prefpane (on a mac), it resets the vhost.conf files back to the defaults that the prefpane uses, it was changing the custom edits I was making. So in the httpd.conf file after this: <IfModule passenger_module> NameVirtualHost *:80 <VirtualHost *:80> ServerName _default_ </VirtualHost> Include /private/etc/apache2/passenger_pane_vhosts/*.conf </IfModule> I added my custom vhost, this: <VirtualHost *:80> ServerName ho.detail DocumentRoot "/Users/***/Sites/Rails/eaton/public" # RackEnv development RailsEnv development PassengerPoolIdleTime 0 <Directory "/Users/***/Sites/Rails/eaton/public"> Order allow,deny Allow from all </Directory> PassengerPoolIdleTime 0 </VirtualHost> And it worked perfectly. Thanks for all your help! Marc On Mar 20, 6:17 pm, Ryan Michael <keri...@gmail.com> wrote: > I use RailsEnv and it works for me, just point it at your public > folder > > On Mar 20, 8:45 am, Chris <r3ap3r2...@gmail.com> wrote: > > > You need to edit /etc/apache2/passenger_pane_vhosts/your_vhost.conf manually. > > The passenger pref pane only adds "RailsEnv development" to the server > > config. You also need "RackEnv development" (or production depending > > on which mode you are running in). > > > Actually I may have it reversed, I can't remember for sure which one > > is added by the pref pane. Basically, whichever one you see when you > > edit the file add the other and restart apache. > > > -Chris > > > On Sat, Mar 20, 2010 at 6:06 PM, Marc Lipovsky <marclipov...@gmail.com> wrote: > > > I haven't been able to find anything on this really. I'm running > > > passenger on my Mac and on my DreamHost domain. I'm using the > > > Passenger PrefPane on my Mac and I added the Spree application like I > > > did with the rest of the apps but it doesn't work. > > > > Any ideas? Thanks! > > > > -- > > > You received this message because you are subscribed to the Google Groups "Spree" group. > > > To post to this group, send email to spree-user@googlegroups.com. > > > To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. > > > For more options, visit this group athttp://groups.google.com/group/spree-user?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
On 20 Mar 2010, at 16:50, Lb2007 wrote: As my app is continuing to grow a little older, I've come to the point where I want to allow a user to upload an avatar (with Paperclip) using AJAX. However, I've noticed just about the only way to get this done is to use the (imo) pretty dirty solutions with either Flash or the remote_form_for RJS stuff.
For instance http://valums.com/wp-content/uploads/ajax-upload/demo-jquery.htm seems to offer a pretty neat solution on how to style the upload stuff, but from what I've read, it's not possible to get this done properly due to the CSRF stuff.
So now I'm wondering; isn't it possible to get AJAX uploads working using jQuery with the CSRF protection enabled, without using Flash or RJS? Best regards
Peter De Berdt
Read More…
Hi, I have a form that I am observing with observe_field <%= observe_field :guess, :frequency => 0.6, :update => 'ajaxWrapper', :url => {:action => 'feedback', :only_path => false}, :with => 'correct=#{@chapter[0])}' %> When I construct the parameters for the URL, I'd like to use a javascript variable to index into the chapter array. (Instead of always selecting the first element as in the example above) Is that possible? I can't figure out how to access the variable from within the #{} -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
On 20 March 2010 18:29, RichardOnRails < RichardDummyMailbox58407@uscomputergurus.com> wrote: > Hi, > > I've got a public\images\DownArrow.jpg > and app\views\expenses\new.html.erb that want to present this image in > the following context: > > <p> > <%= f.label :vendor %><br /> > <%= f.text_field :vendor %> > <%= f.image "DownArrow.jpg" %> I think that should be <%= image_tag "DownArrow.jpg" %> Colin > <br> > <%= select_tag "test", > options_for_select(@current_vendors.collect { |v| v.nickname }), > {:multiple => true} %> > </p> > > But Rails gushes the unforgiving response: > undefined method `image' for #<ActionView::Helpers::FormBuilder: > 0x48194e0> > > I couldn't find anything helpful in: > -- http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html > -- http://api.rubyonrails.org/http://api.rubyonrails.org/ > -- Google > > Any ideas? > > Thanks in Advance, > Richard > > -- > 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@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I've been trying all day to make this work. I want to define the collection_serialization_options method so I will be able to send more information when the /api/orders call is made. What I've done is: - Create a new extension: script/generate extension ReporterApi - Create a new file called orders_controller.rb under vendor/ extensions/reporter_api/controllers/api . This should override the existing one right? - The new code I've used for this file is the following: class Api::OrdersController < Api::BaseController resource_controller_for_api actions :index, :show private def collection_serialization_options { :include => {:ship_address, :bill_address, :line_items} } end def object_serialization_options { :include => { :bill_address => {}, :ship_address => {}, :shipments => {:include => [:shipping_method, :address]}, :line_items => {:include => [:variant]} } } end end Any idea how can I solve this?
Thanks in advance -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
I use: <% form_for @prospect do |f| %> which generates: <form action="/prospects" class="new_prospect" id="new_prospect" method="post"> Cheers, Ryan
On Mar 20, 5:31 am, Conrad Taylor <conra...@gmail.com> wrote: > On Sat, Mar 20, 2010 at 1:52 AM, rjunee <r...@junee.org> wrote: > > I'm hoping someone can advise me on how to debug this routing error. > > > My routes.rb includes: > > resources :prospects, :only => ["create"] > > > rake routes shows: > > prospects POST /prospects(.:format) > > {:controller=>"prospects", :action=>"create"} > > > However when I try to post a form I get: > > > Started POST "/prospects" for 127.0.0.1 at 2010-03-20 01:44:29 > > > ActionController::RoutingError (No route matches "/prospects"): > > > Rendered /Users/ryan/.rvm/gems/ruby-1.9.1-p378/gems/ > > actionpack-3.0.0.beta/lib/action_dispatch/middleware/templates/rescues/ > > routing_error.erb within /Users/ryan/.rvm/gems/ruby-1.9.1-p378/gems/ > > actionpack-3.0.0.beta/lib/action_dispatch/middleware/templates/rescues/ > > layout.erb (0.9ms) > > > Any ideas? > > Hi, how are you trying to post the form? > > -Conrad > > > > > -- > > 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@googlegroups.com. > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.
-- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi, I have recently moved my RoR app on the Heroku platform, and almost everything works fine apart from the videos. It works fine when my app runs in local but not on heroku. This is the error log I'm getting, if anyone knows where it can be coming from: Processing VideosController#new (for IP at 2010-03-20 04:32:09) [GET] Session ID: 6abecf60c3369d7c7029e366bb801e08 Parameters: {"artist_id"=>"10", "action"=>"new", "controller"=>"admin/videos"} Rendering within layouts/admin Rendering admin/videos/new
ActionView::TemplateError (undefined method `video_file_relative_path' for #<Video:0x2adc9839fe28>) on line #21 of app/views/admin/videos/ _form.rhtml: 18: 19: <p><label for="videos_image_file">Fichier Vidéo SWF</label><br/> 20: <% if @video.video_file %> 21: <%= link_to image_tag(url_for_file_column("video", "video_file", :name => "thumbnail"))+"<br>", {:controller => url_for_file_column("video", "video_file")}, :popup => ['new_window', 'height=200,width=200'] %> 22: <% end %> 23: <%= file_column_field 'video', 'video_file' %> 24:
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb: 1792:in `method_missing' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.rb: 75:in `send' #{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.rb: 75:in `url_for_file_column' #{RAILS_ROOT}/app/views/admin/videos/_form.rhtml:21:in `_run_rhtml_admin_videos__form' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 290:in `render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 249:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 264:in `render' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/partials.rb: 59:in `render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:33:in `benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/partials.rb: 58:in `render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 276:in `render' #{RAILS_ROOT}/app/views/admin/videos/new.rhtml:4:in `_run_rhtml_admin_videos_new' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 314:in `compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 290:in `render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb: 249:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:699:in `render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:621:in `render_with_no_layout' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ layout.rb:243:in `render_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:53:in `render' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:53:in `render' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:911:in `perform_action_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ filters.rb:368:in `perform_action_without_benchmark' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ rescue.rb:82:in `perform_action' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:381:in `send' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ base.rb:381:in `process_without_filters' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ filters.rb:377:in `process_without_session_management_support' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/ session_management.rb:117:in `process' #{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:60:in `serve_rails' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:80:in `call' /home/heroku_rack/lib/static_assets.rb:9:in `call' /home/heroku_rack/lib/last_access.rb:25:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 46:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 40:in `each' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb: 40:in `call' /home/heroku_rack/lib/date_header.rb:14:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 60:in `call' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:80:in `pre_process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:78:in `catch' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:78:in `pre_process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:57:in `process' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ connection.rb:42:in `receive_data' /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run_machine' /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/ base.rb:57:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb: 150:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/controllers/ controller.rb:80:in `start' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `send' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `run_command' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 139:in `run!' /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6 /usr/local/bin/thin:20:in `load' /usr/local/bin/thin:20 Thanks,
Roch -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I have a text_field that stores an invoice due date. It's value is updated by JQuery when the user specifies the terms of the invoice. So, the value would become the Invoice Date + Terms. The text_field should be disabled so that the user can't put it a random date without regard to the terms or invoice date. However, adding the :disabled attribute to the text_field, or adding the disabled attribute via JQuery results in the value not being saved when the invoice is created. How can I make the value of the disabled text_field be recorded during the @invoice.save? -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Great blog, I have forwarded this to some beginners I know. On Mar 19, 3:52 pm, pankaj <pankajbhage...@gmail.com> wrote: > Hello Everyone, > I have started my blog athttp://railsguru.org. > Besides other stuff on Rails, the main focus of the site will be to > help beginners to learn Ruby and Rails and build the fundamentals. > > Regards, > Pankaj Bhageria, > Tech Lead, Sumeru Software Solutions.http://www.railsguru.orghttp://www.sumeru.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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi all, First I'm new to RoR so if I'm asking a question thats simple sorry but I can't find the answer on google. I have a number of controllers that are working fine and I've got the foreign keys etc working.
What I'm looking to do now is have an index page that will have information displayed from lets say 3 of these controllers on the page with links to other pages. Can I ask someone to point me in the right direction, do I have to create a new controller for this (surely not as this goes against DRY) Thanks, Graham -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Fernando, When you say... "When you have too many migration files, simply remove them." ...I think this means that you refer to the schema as the one source of summary information and that migration files are not informative except when a developer wants to revert to an earlier stage via 'redo' or 'version'. Grar On Mar 19, 7:38 pm, Fernando Perez <li...@ruby-forum.com> wrote: > > I prefer to keep one migration per model > > It's a bad an unmaintainable idea. I did that when I was a beginner in > RoR. > > Simply create migrations to add/remove columns to existing tables. When > you have too many migration files, simply remove them. The whole schema > is saved in schema.rb > -- > Posted viahttp://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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi, I am new to ROR and this group. I would like to install a ROR environment able to generate full localized applications, always in the same language (Italian for example), without having to edit by hand all templates, scaffolded HTML and standard error messages. I searched Internet and this group, but I was no able to get information about. Is there a way to do that ? Thanks Nellinux -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I use RailsEnv and it works for me, just point it at your public folder On Mar 20, 8:45 am, Chris <r3ap3r2...@gmail.com> wrote: > You need to edit /etc/apache2/passenger_pane_vhosts/your_vhost.conf manually. > The passenger pref pane only adds "RailsEnv development" to the server > config. You also need "RackEnv development" (or production depending > on which mode you are running in). > > Actually I may have it reversed, I can't remember for sure which one > is added by the pref pane. Basically, whichever one you see when you > edit the file add the other and restart apache. > > -Chris > > > > On Sat, Mar 20, 2010 at 6:06 PM, Marc Lipovsky <marclipov...@gmail.com> wrote: > > I haven't been able to find anything on this really. I'm running > > passenger on my Mac and on my DreamHost domain. I'm using the > > Passenger PrefPane on my Mac and I added the Spree application like I > > did with the rest of the apps but it doesn't work. > > > Any ideas? Thanks! > > > -- > > You received this message because you are subscribed to the Google Groups "Spree" group. > > To post to this group, send email to spree-user@googlegroups.com. > > To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/spree-user?hl=en. -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
As my app is continuing to grow a little older, I've come to the point where I want to allow a user to upload an avatar (with Paperclip) using AJAX. However, I've noticed just about the only way to get this done is to use the (imo) pretty dirty solutions with either Flash or the remote_form_for RJS stuff. For instance http://valums.com/wp-content/uploads/ajax-upload/demo-jquery.htm seems to offer a pretty neat solution on how to style the upload stuff, but from what I've read, it's not possible to get this done properly due to the CSRF stuff. So now I'm wondering; isn't it possible to get AJAX uploads working using jQuery with the CSRF protection enabled, without using Flash or RJS? Thanks so much in advance! -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Be on the look out for some improved documentation coming to spree-guides[1] any day now. David is working on it as I type this. Sean Schofield [1] http://github.com/railsdog/spree-guides ------------------------------------------- Rails Dog LLC 2 Wisconsin Circle, Suite 700 Chevy Chase, MD 20815 voice: (301)560-2000 ------------------------------------------- On Wed, Mar 17, 2010 at 5:30 PM, Space Rash <hosebag@gmail.com> wrote: > I was wondering if anyone could help me with a step-by-step workflow > for doing returns in 0.10.x? I kinda understand but I want to make > sure I am doing this correctly before I tell a client. > > -- > You received this message because you are subscribed to the Google Groups "Spree" group. > To post to this group, send email to spree-user@googlegroups.com. > To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/spree-user?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
Try rake db:migrate RAILS_ENV=production (don't mess with schema stuff.) What happens then? Sean Schofield ------------------------------------------- Rails Dog LLC 2 Wisconsin Circle, Suite 700 Chevy Chase, MD 20815 voice: (301)560-2000 ------------------------------------------- On Fri, Mar 19, 2010 at 12:50 PM, BahamaLlama <don@bahamallama.cc> wrote: > I'm trying get the app up and running on my production server running > ubuntu, apache2, passenger and deployed with capistrano from my git > repo. > > The following is the error I get: > > I'm doing this from my phone so I liked to my post at railsforum for > me details. Any help is appreciated! > > Thanks, > d > > > rake RAILS_ENV=production db:schema:load > gives me: > rake aborted! > production database is not configured > > more info at: > > http://railsforum.com/viewtopic.php?id=37906 > > -- > You received this message because you are subscribed to the Google Groups "Spree" group. > To post to this group, send email to spree-user@googlegroups.com. > To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/spree-user?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
Try putting <%= %> around the rails helpers. Sean Schofield ------------------------------------------- Rails Dog LLC 2 Wisconsin Circle, Suite 700 Chevy Chase, MD 20815 voice: (301)560-2000 ------------------------------------------- On Sat, Mar 20, 2010 at 11:40 AM, Bruno <bruno.lehyaric@gmail.com> wrote: > Hi, > > I've created an extension and would like to add some CSS and Scripts > to the header of my spree application... > > So I'm trying to use extension hooks like this (my extension is called > restfulx) : > > ================================================================================================ > in ./vendor/extensions/restfulx/restfulx_hooks.rb > > insert_after :inside_head do > stylesheet_link_tag 'history/history.css' > javascript_include_tag [ 'AC_OETags.js', 'history.js' ] > > <<-FLASH_VERSION > <script language="JavaScript" type="text/javascript"> > <!-- > // > ----------------------------------------------------------------------------- > // Globals > // Major version of Flash required > var requiredMajorVersion = ${version_major}; > // Minor version of Flash required > var requiredMinorVersion = ${version_minor}; > // Minor version of Flash required > var requiredRevision = ${version_revision}; > // > ----------------------------------------------------------------------------- > // --> > </script> > FLASH_VERSION > end > ================================================================================================ > > But standard Rails helper seems not to be accessible in this context > (stylesheet_link_tag, javascript_include_tag...)... > > How can I get them accessible? > Is the right way to do this? > > > Bruno. > > > -- > You received this message because you are subscribed to the Google Groups "Spree" group. > To post to this group, send email to spree-user@googlegroups.com. > To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/spree-user?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
Hi, I've created an extension and would like to add some CSS and Scripts to the header of my spree application... So I'm trying to use extension hooks like this (my extension is called restfulx) : ================================================================================================ in ./vendor/extensions/restfulx/restfulx_hooks.rb insert_after :inside_head do stylesheet_link_tag 'history/history.css' javascript_include_tag [ 'AC_OETags.js', 'history.js' ] <<-FLASH_VERSION <script language="JavaScript" type="text/javascript"> <!-- // ----------------------------------------------------------------------------- // Globals // Major version of Flash required var requiredMajorVersion = ${version_major}; // Minor version of Flash required var requiredMinorVersion = ${version_minor}; // Minor version of Flash required var requiredRevision = ${version_revision}; // ----------------------------------------------------------------------------- // --> </script> FLASH_VERSION end ================================================================================================ But standard Rails helper seems not to be accessible in this context (stylesheet_link_tag, javascript_include_tag...)... How can I get them accessible? Is the right way to do this? Bruno.
-- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
Hi, I'm new to Spree and I've started following the tutorials. I've got an issue with an official one called: Tutorial: A Customization Extension http://spreecommerce.com/documentation/customization_tutorial.html The text claims: 7.2 Deactivation At this point in time, to deactivate your site extension, move the SITE_EXTENSION_DIR out of the vendor/extensions directory. At least with Spree 0.10.0 js and css files are copied to the main public folder and moving the extension is not enough. Also the preferences table gets updated with the new logo and style, removing the extension only doesn't obviously remove those. Is this a bug, feature or is there a new way to move the theme extensions? Cheers -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
Hi! I've been working for a while with Spree and today I decided to try the new edge version. I cloned the git repository and typed the rake db:bootstrap command. After initializing the database with some sample data, I wanted to know how to move an order from Pending to Shipped, but I couldn't figure out a way to do it. Is there something I am missing? I want to clarify that the state I want to change is not from the order but from the shipment tab of an order. I would also like to understand how an order is created. A "New" state of an order means that has already been paid by the customer?
Thanks -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
|