Re: [Rails] Re: Util.html_escape() in erb file

2010-09-23 Thread Colin Law
On 24 September 2010 05:58, Maz Zalk wrote: > Phillip wrote: >> Don't do anything and the escaped characters will appear as you >> intend. >> >> in view code: >> <% text = "  > blah">LetterAttack... >> is what i say" -%> >> >> <%= text -%> >> >> renders li

[Rails] Re: rails Dirty object concept is not working with nested att

2010-09-23 Thread Sunny Bogawat
Hi, Anybody know how this will work? -- 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.com. To unsubscribe from this group, sen

[Rails] Re: Re: Chat Application

2010-09-23 Thread Veera Sundaravel
Yes xmpp3r with ruby is a good Idea. http://devblog.famundo.com/articles/category/xmpp4r-jabber There are 3 articles related to the integration. Regards, T.Veeraa. http://tinyurl.com/25vma7h @veerasundaravel shyam mohan wrote: > Hi ... > > try this ... > http://rubypond.com/blog/make-your-o

[Rails] Re: Util.html_escape() in erb file

2010-09-23 Thread Maz Zalk
Phillip wrote: > Don't do anything and the escaped characters will appear as you > intend. > > in view code: > <% text = "  blah">LetterAttack... > is what i say" -%> > > <%= text -%> > > renders like this: > � http://www.blahblah.org/blah";>LetterAttac

[Rails] Re: conditional show action

2010-09-23 Thread Raja Venkataraman
badnaam wrote: > How can I render a show action on certain conditions? > > def show > @post = Post.find_approved > if @post.approved > approved = true > end > respond_to do |format| > # I only want to render show.html.erb if approved is true if not I > would like to redirect the

[Rails] Re: Problems Starting Server (local)

2010-09-23 Thread Mark
Found it. Very simple. You only have to update the gems. "gem update" That works for me. On 23 Sep., 19:37, Mark wrote: > Hey, > > i have some problems by starting the server. When want to start it (./ > script/server) i get the following issue: > > /Library/Ruby/Site/1.8/rubygems/custom_requir

Re: [Rails] Re: How to run ruby from anywhere ?

2010-09-23 Thread rajeevsharma86
On windows there is a optin while installing ruby. some thing like path add Check that while install and run ruby from everywhere On Thu, Sep 23, 2010 at 6:10 PM, Amit Tomar wrote: > Tanawat Limungkura wrote: > > I use windows platform.I've alredy extrated ruby on c:\ drive.But when > > i need

[Rails] Re: how to make an ajax call to redirect

2010-09-23 Thread Vicer Ontero
Sjoerd Andringa wrote: > Hi daociyiyou , > > Try this: > > def find_created_actions > unless @if_login >flash[:login]="..." >redirect_to(:controller=>"login",:action=>"login") > end > if @if_login >@user_cactio...@user.sponsored_actions >render :update

[Rails] conditional show action

2010-09-23 Thread badnaam
How can I render a show action on certain conditions? def show @post = Post.find_approved if @post.approved approved = true end respond_to do |format| # I only want to render show.html.erb if approved is true if not I would like to redirect the user back to where he came from e

[Rails] Re: Named scope in named scope ??

2010-09-23 Thread Raja Venkataraman
Adrien Nom wrote: > Hi, > > I would like to return a combination of named scopes in a named > scope : > > For example, I have a named scope filter and I want to add a named > scope eval_filters like > > Product.eval_filters(['x','y','z']) is equivalent to > Product.filter('x').filter('y').filter

Re: [Rails] How to update ruby and rails in instantrails2.0

2010-09-23 Thread Norm Scherer
Tanawat Limungkura wrote: I use Instans rails 2.0.But the version of rails and ruby still old.I need to update to latest version. What should I do ? Thanks The first step is to update rubygems I found it works best to download from ru

[Rails] mysql install problems, please help

2010-09-23 Thread Fifofafofi Maza
I can't install mysql on ruby? please help me >ruby ./install.rb http://ipicture.ru/uploads/100924/MWup72534z.jpg >rake db:migrate http://ipicture.ru/uploads/100924/x2TmxW5Z4s.jpg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Googl

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread Marnen Laibow-Koser
nobosh wrote: > Thanks Marnen but it sounds like I could use some help from a Rails > 3 / AJAX guru on this one. Anyone? Please follow my advice first. It will get you most of the way there. Right now you're on the wrong path. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.or

[Rails] how to change the order of the group_method parameter in the grouped_collection_select method?

2010-09-23 Thread Demetrius
Anyone know how to order the group_method parameter in the grouped_collection_select method? I get a nice list of subjects in my drop down BUT they are not in order (alpha...) My code is below (:subjects is my group_method parameter). <%= grouped_collection_select(:course, :subject_id, State.

[Rails] File upload conversion

2010-09-23 Thread Jay McGaffigan
hi, I was wondering if anyone has an written a rails app where users upload word documents and on the server convert that file to a pdf? I'm trying to figure out the best way to convert the file to a pdf on the server. We are deploying our app on a linux web host (for cost reasons we are on a s

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread nobosh
Thanks Marnen but it sounds like I could use some help from a Rails 3 / AJAX guru on this one. Anyone? On Sep 23, 4:51 pm, Marnen Laibow-Koser wrote: > nobosh wrote: > > Thanks Marnen. I feel ok about how AJAX works perhaps I wasn't asking > > the question well enough. I did a little more digging

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread Marnen Laibow-Koser
nobosh wrote: > Thanks Marnen. I feel ok about how AJAX works perhaps I wasn't asking > the question well enough. I did a little more digging and can show an > example that might help clear out what I'm working to understand in > Rails 3 I've never used Rails 3, and I do little enough Ajax dev

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread nobosh
This seems to work. but feels like a hack... Thoughts anyone? Updated the application.js to run: $.ajax({ url: '/books', }); Created a _index.html.erb that has the books view (just copied it from index.html.erb so I had a partial. Then in the index.js.erb, added this: $(".contentCol").html("<%

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread nobosh
Thanks Marnen. I feel ok about how AJAX works perhaps I wasn't asking the question well enough. I did a little more digging and can show an example that might help clear out what I'm working to understand in Rails 3 The goal, is to be able to inject html content into a contentPanel on a page w

[Rails] I cant generate scaffold on linux platform

2010-09-23 Thread Tanawat Limungkura
It use rails 3.0 v .but when I try to generate scaffold it perform me Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources. Try running `bundle install`. I already tried but It's error and show bunch of massage Using rake (0.8.7) /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher

[Rails] is it a good rails agile code?

2010-09-23 Thread Mauro
I have two classes: User and Delivery. class Ruser < ActiveRecord::Base has_many :deliveries, :dependent => :destroy class Delivery < ActiveRecord::Base belongs_to :ruser In the User show action I have put: <%= render :partial => 'deliveries/form' %> So that showing the user I can create a d

[Rails] Re: I cant' use Netbenas to develop ruby

2010-09-23 Thread Agoofin
I stay on the command line for the generators and such, using Netbeans to do the other programming tasks. On Sep 23, 4:00 am, Vitaliy Yanchuk wrote: > Try to set config.action_controller.consider_all_requests_local = true for > your development environment > It will show proper Exeption messag

[Rails] Re: Re: Re: problem with complex function to save in db

2010-09-23 Thread Ar Chron
Hmm... maybe you do need a table name involved: Controller: def create hash = params[:faction] hashnew = save_ids(hash, 'FactionContent') Faction.create(hashnew) @faction = Faction.find(:last, :order => 'id') end And that other routine: def save_ids(arguments, table) ret = Hash.new

[Rails] hello

2010-09-23 Thread Tyler Jennings
Dear Friends: Some time ago. A friend Had birthday. ordered my friend a birthday present: New Apple iPhone 4G HD 16GB Black Unlocked 1Year Warranty I ordered products in China website. My friend has been received. Friends tell me. Product very good! It's amazing! The item is original, brand new a

[Rails] Re: Rails + Paperclip + IE: pictures disappear!

2010-09-23 Thread apneadiving
I've found the pb... IE is definitely crappy the pictures with problems weren't encoded in RGB (despite the jpg extension)... Thanks to GIMP, I converted it, everything is fine now! On Sep 22, 11:31 pm, apneadiving wrote: > Hi Radhames, > > Thanks for your advice, I'll try this once I've a

[Rails] Re: Rails + Paperclip + IE: pictures disappear!

2010-09-23 Thread apneadiving
I've found the pb... IE is definitely crappy the pictures with problems weren't encoded in RGB (despite the jpg extension)... Thanks to GIMP, I converted it, everything is fine now! On Sep 22, 11:31 pm, apneadiving wrote: > Hi Radhames, > > Thanks for your advice, I'll try this once I've a

[Rails] Re: Re: Re: problem with complex function to save in db

2010-09-23 Thread Ar Chron
Almog Friedman wrote: > heres the log hope it'll help: > Processing FactionsController#create (for 127.0.0.1 at 2010-09-23 21:46:39) [POST] Parameters: {"commit"=>"Create", "authenticity_token"=>"1f1aa67b947f0e23dc19aad8debc1e63b6df002c", "faction"=>{"name"=>"asdasd", "name_plural"=>"asdasd", "d

[Rails] Re: ActiveScaffold and partials

2010-09-23 Thread SW Engineer
Thanks @Marnen. I think my issue was solved by the simple example here: http://vhochstein.wordpress.com/2010/08/28/setupactivescaffoldrails3/#comments What I was trying to do with partials is that I have an "items" and "itemdetails" tables, and "items" "has_many" "itemdetails", and wanted the

[Rails] Named scope in named scope ??

2010-09-23 Thread Adrien Coquio
Hi, I would like to return a combination of named scopes in a named scope : For example, I have a named scope filter and I want to add a named scope eval_filters like Product.eval_filters(['x','y','z']) is equivalent to Product.filter('x').filter('y').filter('z') Anybody know how can I define t

[Rails] Re: Can't install mysql2 gem on Windows 7

2010-09-23 Thread Luis Lavena
On Sep 23, 5:03 pm, Robert Wilson wrote: > I am new to Ruby and have tried and failed several times installing > mysql2 gem on my windows 7 OS. I checked several forums for solutions > but still couldn't get that installed. can someone help my out please? > > below is the error: > c:\>gem install

[Rails] Re: Confused with bcrypt and Authlogic

2010-09-23 Thread Ar Chron
CV wrote: > Well, I didn't realize that there was a lower-level part to the > library too! But unfortunately we're not there yet: > > ruby-1.9.2-p0 > BCrypt::Engine.hash_secret("test", > "Hki1ozSQrkmvGzddNJq") > BCrypt::Errors::InvalidSalt: invalid salt I wonder if Authlogic overrode any of the d

[Rails] Can't install mysql2 gem on Windows 7

2010-09-23 Thread Robert Wilson
I am new to Ruby and have tried and failed several times installing mysql2 gem on my windows 7 OS. I checked several forums for solutions but still couldn't get that installed. can someone help my out please? below is the error: c:\>gem install mysql2 Building native extensions. This could take a

Re: [Rails] Re: Re: problem with complex function to save in db

2010-09-23 Thread Almog Friedman
heres the log hope it'll help: Processing FactionsController#index (for 127.0.0.1 at 2010-09-23 16:03:25) [GET] SQL (0.1ms) SET NAMES 'utf8' SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 Faction Load (0.4ms) SELECT * FROM `factions` Rendering template within layouts/factions Rendering factions/i

[Rails] Request Failed (code 500, Internal Error) Close - ActiveS

2010-09-23 Thread SW Engineer
I used ActiveScaffold to create my Rails application. After I fill the fields and try to "Create" the new data, I get the following: Request Failed (code 500, Internal Error) Close I don't know if this is caused by the "Date" field, which its value looks like this: Wed, 15 Sep 2010 00:00:00 %z

[Rails] Dynamic controller dispatching in rails 3

2010-09-23 Thread fredd
Is there any offical way you could dynamically dispatch controllers in Rails 3? My goal is to invoke different controllers based on path segments like this: /news/sport-blog, should map to a blog controller or /news/sports/2, should map to a page controler In the example cases above, the path sho

[Rails] Re: Confused with bcrypt and Authlogic

2010-09-23 Thread CV
Well, I didn't realize that there was a lower-level part to the library too! But unfortunately we're not there yet: ruby-1.9.2-p0 > BCrypt::Engine.hash_secret("test", "Hki1ozSQrkmvGzddNJq") BCrypt::Errors::InvalidSalt: invalid salt On Sep 23, 9:46 pm, Ar Chron wrote: > Should you be using someth

[Rails] Re: Re: problem with complex function to save in db

2010-09-23 Thread Ar Chron
Almog Friedman wrote: > sorry but I'm kinda new with rails, i don't know how to get a log of the > hash itself. > how do I do that? development.log should be in a folder like: C:\rails\appname\log\development.log or home\druid\rails\appname\log\development.log in a *nix envt. -- Posted via htt

Re: [Rails] Capturing a block in ERB

2010-09-23 Thread Gerold
:) i suppose i could to that but then i still have a problem: <% wrapper do %> <%= my_view_helper %> <% end %> The <% for the wrapper needs to stay but the <%'s inside the wrapper should be replaced. I understand this is a very specific problem and i am probably the only one who has t

Re: [Rails] Re: problem with complex function to save in db

2010-09-23 Thread Almog Friedman
sorry but I'm kinda new with rails, i don't know how to get a log of the hash itself. how do I do that? On Thu, Sep 23, 2010 at 4:49 PM, Ar Chron wrote: > TEREN wrote: > > > > this is my function: > > def save_id(arguments, tables) > > arguments_id = arguments > > arguments.each_pair d

[Rails] Re: Confused with bcrypt and Authlogic

2010-09-23 Thread Ar Chron
Should you be using something like: if BCrypt::Engine.hash_secret(password, u.salt) == u.crypted_password valid = true end -- 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

Re: [Rails] Capturing a block in ERB

2010-09-23 Thread Jeremy Kemper
You could also just show the <%%= when you render the file itself :) (The way ERB compiles the template prevents you from getting the "source" of a block directly.) jeremy On Thu, Sep 23, 2010 at 11:35 AM, Gerold wrote: > Hi Jeremy, > > Thanks for the quick reply! Let me explain my problem bett

[Rails] Re: Confused with bcrypt and Authlogic

2010-09-23 Thread Ar Chron
CV wrote: > ...but the result is "false". Do we need to work the salt in? And if > yes, how? Trying to pass it as a constructor argument or trying the > "salt" setter doesn't work. You're saving the crypted_password and the salt that was used to create it, so the validation of a newly submitted p

Re: [Rails] Capturing a block in ERB

2010-09-23 Thread Gerold
Hi Jeremy, Thanks for the quick reply! Let me explain my problem better: <% wrapper do %> <%= my_view_helper %> <% end %> This is the view for a action. I need to be able to render this as usual and i also need to be able to capture the block. Both times the template should look like my exam

[Rails] Re: ActiveScaffold and partials

2010-09-23 Thread Marnen Laibow-Koser
SW Engineer wrote: > I was thinking of doing partials as I did in the simple Rails > application I worked on today. > > But, since I'm using ActiveScaffold, I didn't find any *.html.erb in the > views folder of the Rails application that I need to make my partials! Right. ActiveScaffold is a plu

[Rails] Re: problem with the "detail"-method

2010-09-23 Thread Ar Chron
Sven Wildermann wrote: > You have a nil object when you didn't expect it! > You might have expected an instance of ActiveRecord::Base. > The error occured while evaluating nil.update_attributes" > Can you show the POST from your log file... I'd like to see what your params hash looks like. --

Re: [Rails] Capturing a block in ERB

2010-09-23 Thread Jeremy Kemper
Hey Gerold, On Thu, Sep 23, 2010 at 9:58 AM, Gerold Böhler wrote: > Hi all, > > i have the following code as an erb template in rails 3: > > <%= wrapper do %> >   >    <%= content_tag(:span, "Hello World") %> >   > <% end %> > > and this in the helper > > def wrapper(&block) > ... > end > > Now i

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread Marnen Laibow-Koser
nobosh wrote: > On Sep 23, 8:37�am, Marnen Laibow-Koser wrote: >> > Any pointers, tips, tutorials? thanks! >> >> This is fairly simple Ajax. �What part do you need help with? > > Thanks Marnen. Right now I need helping understanding the end to end > flow in Rails. I could use help with the follow

[Rails] Capturing a block in ERB

2010-09-23 Thread Gerold Böhler
Hi all, i have the following code as an erb template in rails 3: <%= wrapper do %> <%= content_tag(:span, "Hello World") %> <% end %> and this in the helper def wrapper(&block) ... end Now i would like to be able to capture the block into a variable without parsing it: result = captu

[Rails] Confused with bcrypt and Authlogic

2010-09-23 Thread CV
I'm in the progress of migrating my website from using Authlogic to my own authentication solution for one reason or another and I've hit a little problem - I've set Authlogic to use bcrypt-ruby for passwords, and now I'm confused as to how I'm supposed to work with the library and authenticate exi

[Rails] Re: ActiveScaffold and partials

2010-09-23 Thread SW Engineer
I think the solution to that was using "references" as shown in the example below: http://vhochstein.wordpress.com/2010/08/28/setupactivescaffoldrails3/#comments -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rai

[Rails] rspec problems mocking classes based on mongoid

2010-09-23 Thread E
I am getting errors when running my rspecs. My project uses rails 3, mongoid, factory_girl, rspec 2.0.0.beta.22, rspec-mocs, etc http://pastebin.com/raw.php?i=WkaGiFag Getting: Failure/Error: @product = assign(:product, stub_model(Product, undefined method `to_sym' for nil:NilClass I'm pretty su

[Rails] Problems Starting Server (local)

2010-09-23 Thread Mark
Hey, i have some problems by starting the server. When want to start it (./ script/server) i get the following issue: /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- /Library/Ruby/Gems/1.8/ gems/more-0.1.1/rails/../lib/less/controller_exten

[Rails] [Cross Post] Volunteers and Teachers <3 October 22-23 Rails Outreach for Women

2010-09-23 Thread Curtis j Schofield
[Forgive the Crosspost - this is a community mailout ] What: October 22-23 Rails Outreach for Women URL: http://www.meetup.com/sfruby/calendar/14835957/ Short: Wanted : Rails, BDD/TDD, Cucumber, Ruby Teachers / Volunteer Long: Do you want to share your experience? Have you ever thought " Gee -

[Rails] Browsing Image on Apache in rails App

2010-09-23 Thread Saurabh Peshkar
Hi All, My rails application is running on Apache server with phusion_passenger gem. For testing purpose I used both attachment_fu and paperclip to upload image in that application. There are two different methods, one for image uploading using attachment_fu and another for paperclip. When the ap

[Rails] Re: Maintain connections to two databases

2010-09-23 Thread michael_teter
Well! That explains a lot. :) This was all in development mode. As slow as it is in development mode, I'd never release it to production. Fortunately, for reasons you explained above, it does not suffer the same performance problems in production mode. I suppose since previously I was only wor

[Rails] Helpers in Lib Modules

2010-09-23 Thread Joshua Martin
Anyone know how to successfully use ActionView helpers (link_to, contacts_path, contact_path(contact)) in a module included in the /lib directory? Every time i attempt this by including the helper (include ActionView::Helpers::UrlHelper, etc) i get a Stack Trace too Deep error. -- __

[Rails] Re: Re: Connecting several tables in single database

2010-09-23 Thread Ar Chron
You are probably getting an "undefined method 'cities' for #" error. Address each hierarchy level in turn... <% @names.each do |name| %> <% name.cities.each do |city| %> <%= city.local_area %> <% end %> <% end %> <% @names.each do |name| %> <% name.countries.each do |country| %> <%

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread nobosh
On Sep 23, 8:37 am, Marnen Laibow-Koser wrote: > nobosh wrote: > > Hello, I'm interested in learning the correct/smart approach for > > implementing a web page with tabs and a content panel... When the tab > > is clicked by the user the tab's content is fetched and inserted with > > jQuery... no

[Rails] Re: problem with the "detail"-method

2010-09-23 Thread Sven Wildermann
On 23 Sep., 16:25, Ar Chron wrote: > Sven Wildermann wrote: > > class FormController < ApplicationController > >   def index > >     @form = Form.find(:first) > >     @form.update_attributes(params[:form]) > > >     @detail = @form.detail > >     @detail.update_attributes(params[:detail]) > >  

Re: [Rails] Re: Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"

2010-09-23 Thread radhames brito
awesome link marnen On Thu, Sep 23, 2010 at 10:21 AM, Marnen Laibow-Koser wrote: > nobosh wrote: > > I was able to use > > gem 'nested_set' > > Which got it working, now I just need to understand the rlt, lft > > stuff. > > http://dev.mysql.com/tech-resources/articles/hierarchical-data.html > > B

Re: [Rails] Connecting several tables in single database

2010-09-23 Thread PalaniKannan K
Hi, Extreme sorry for all and Colin, I posted in several thread... I will not post repeated posts once again. -- Palani Kannan -- 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...@googleg

Re: [Rails] Connecting several tables in single database

2010-09-23 Thread Colin Law
On 23 September 2010 16:34, PalaniKannan K wrote: Why are you asking the same question in multiple threads? Colin > Hi, > > I tried with > > In View > > <% @names.each do |name| %> > <%= name.age %> > <% name.cities.each do |city| %> > <%= city.local_area %> > <% name.countries.each do |country

Re: [Rails] Table connection issue

2010-09-23 Thread Colin Law
On 23 September 2010 16:35, PalaniKannan K wrote: Please don't top post it makes it difficult to follow the thread, thanks. > Hi, > > I tried with > > In View > > <% @names.each do |name| %> > <%= name.age %> > <% name.cities.each do |city| %> > <%= city.local_area %> > <% name.countries.each do

[Rails] Re: HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread Marnen Laibow-Koser
nobosh wrote: > Hello, I'm interested in learning the correct/smart approach for > implementing a web page with tabs and a content panel... When the tab > is clicked by the user the tab's content is fetched and inserted with > jQuery... no page refresh... > > Example, Facebook, when you click Phot

Re: [Rails] Table connection issue

2010-09-23 Thread PalaniKannan K
Hi, I tried with *In View* <% @names.each do |name| %> <%= name.age %> <% name.cities.each do |city| %> <%= city.local_area %> <% name.countries.each do |country| %> <%= country.state %> <% end %> This shows no error with no output of city.local_area and country.state. On 23 September 2010 17

Re: [Rails] Connecting several tables in single database

2010-09-23 Thread PalaniKannan K
Hi, I tried with *In View* <% @names.each do |name| %> <%= name.age %> <% name.cities.each do |city| %> <%= city.local_area %> <% name.countries.each do |country| %> <%= country.state %> <% end %> This shows no error with no output of city.local_area and country.state On 23 September 2010 12:4

[Rails] Re: Re: problem with the "detail"-method

2010-09-23 Thread Marnen Laibow-Koser
Colin Law wrote: > On 23 September 2010 14:48, Sven Wildermann > wrote: >> I dont use Rail 3, but 1.8.6 - because the Autor of the Tutorial used >> that Version, too. Oh, hold on a minute. Rails 1.8.6 doesn't exist; that looks like a Ruby version number. So...what version of Rails does the tu

Re: [Rails] Re: superclass mismatch for class Tempfile

2010-09-23 Thread Rodrigo Felix
I found the problem. I was defining a new method content_type in the class Tempfile. *class Tempfile def content_type mime_type = IO.popen("file --brief --mime #{path}").gets unless path.blank? mime_type end end* How can I make this without breaking generators? I've already tried the

Re: [Rails] Re: problem with the "detail"-method

2010-09-23 Thread Colin Law
On 23 September 2010 14:48, Sven Wildermann wrote: > > On 23 Sep., 12:02, Colin Law wrote: >> ... >> I would suggest that you use Rails 3 if you are not already doing so >> as it is now the current version, though it is still very new, so >> those who will try to help you are still learning thems

Re: [Rails] Re: Connecting several tables in single database

2010-09-23 Thread PalaniKannan K
Dear Ar Chron, Thanks for your correction. The error solved, but its not still showing the values for <%= city.local_area %> <%= country.state %> On 23 September 2010 16:30, Ar Chron wrote: > PalaniKannan K wrote: > > > *name model* > > has_many :city, :foreign_key => "name_id" > > has_many :c

Re: [Rails] Table connection issue

2010-09-23 Thread PalaniKannan K
Dear Colin, Thanks for your correction. The error solved, but its not still showing the values for <%= city.local_area %> <%= country.state %> On 23 September 2010 17:11, Colin Law wrote: > On 23 September 2010 12:00, PalaniKannan K > wrote: > > Dear all, > > > > I included models, controller

Re: [Rails] Re: Util.html_escape() in erb file

2010-09-23 Thread Colin Law
On 23 September 2010 15:03, Phillip wrote: > Don't do anything and the escaped characters will appear as you > intend. > > in view code: > <% text = "  blah">LetterAttack... > is what i say" -%> > > <%= text -%> > > renders like this: >   http://www.blahb

[Rails] Re: ActiveScaffold and partials

2010-09-23 Thread SW Engineer
radhames brito wrote: > Watch the railscast about inherited_resources at railscasts.com > > 2010/9/22, Abder-Rahman Ali : >> To post to this group, send email to rubyonrails-t...@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscr...@googlegroups.com. >>

[Rails] Re: Where are my field values?!

2010-09-23 Thread SW Engineer
Thanks a lot everyone. -- 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.com. To unsubscribe from this group, send email to rubyo

Re: [Rails] Table connection issue

2010-09-23 Thread Colin Law
On 23 September 2010 12:00, PalaniKannan K wrote: > Dear all, > > I included models, controller and View. Please, find the mistake in it and > tell me. I need to fetch the data of included tables "city and country" > using the query of "first name and second name" of table 'name'. > > name model >

[Rails] HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh

2010-09-23 Thread nobosh
Hello, I'm interested in learning the correct/smart approach for implementing a web page with tabs and a content panel... When the tab is clicked by the user the tab's content is fetched and inserted with jQuery... no page refresh... Example, Facebook, when you click Photos or Events, it doesn't r

Re: [Rails] sou novato por aqui,

2010-09-23 Thread Edmond Kachale
João, Eu não falo Português, mas eu era capaz de ouvir o que você está procurando. Este link pode ajudá-lo, http://groups.google.com/group/ruby-pt/about Atenciosamente, --- Edmond Software Developer | Baobab Health Trust (http://www.baobabhealth.org/) | Malawi Cell: +265 999 465 137 | +265 881

[Rails] Re: problem with complex function to save in db

2010-09-23 Thread Ar Chron
TEREN wrote: > > this is my function: > def save_id(arguments, tables) > arguments_id = arguments > arguments.each_pair do |key, value| > pair = { :english => value} > tables["content"].new.save(pair) > content_id = tables["content"].find(:first, :order => "id > DESC").

[Rails] Re: Multipe Combo box Query System

2010-09-23 Thread Ar Chron
You should look into: http://stackoverflow.com/questions/575862/rjs-using-observe-field-on-select-tag for info on how to use observe_field in combination with a select. I just did a sursory review, and it looks like a decent solution guideline. -- Posted via http://www.ruby-forum.com/. --

[Rails] how to do force apache to handle static request

2010-09-23 Thread Amit Tomar
Posted by Amit Tomar (amit-singh) on 23.09.2010 14:55 hii all, Am running apche as frontend to mongrel ,i added these line in Apache's httpd.conf file LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_

[Rails] E-mail validation -- was: Re: has_many - undefined method!

2010-09-23 Thread Marnen Laibow-Koser
Al Rowan wrote: > class User < ActiveRecord::Base > attr_accessor :password > > validates :email, :uniqueness => true, > :length => { :within => 5..50 }, > :format => { :with => > /^...@][\w.-]+@[\w.-]+[.][a-z]{2,4}$/i } [...] Separate issue, but a pet

[Rails] Anyone working for the Gov using RoR?

2010-09-23 Thread Gene Angelo
Greetings everyone, Is there anyone working for any branch of the government (military branches would be particularly helpful) who is currently using Ruby or RoR? Currently, there is no CON (Certificate of Networthiness) for Ruby or Rails for the US Army (if there is, it'd be news to me). I am try

[Rails] Re: for tests.

2010-09-23 Thread Marnen Laibow-Koser
Msan Msan wrote: > Do you advise me to use cucumber for test? Absolutely, for user-facing behavior (equivalent to functional and integration tests). For unit and similar tests, just use RSpec. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-fo

[Rails] Re: Loop of Properties

2010-09-23 Thread Marnen Laibow-Koser
Saulo Brust wrote: > I'm starting in RoR, sorry if this question seems too basic. > > See the code below. The second parameter of the method Rails3AMF: > IntermediateModel.new must pass ALL properties "field". How do I > implement a loop that does this? > > Thanks, > > Saulo > > > > class

[Rails] Re: Connecting several tables in single database

2010-09-23 Thread Ar Chron
PalaniKannan K wrote: > *name model* > has_many :city, :foreign_key => "name_id" > has_many :country, :foreign_key => "name_id" > * has_many models should be pluralized class name < ActiveRecord::Base has_many :cities has_many :countries end -- Posted via http://www.ruby-forum.com/. -- Yo

[Rails] Re: problem with the "detail"-method

2010-09-23 Thread Marnen Laibow-Koser
Sven Wildermann wrote: > On 23 Sep., 10:36, Colin Law wrote: >> >> >> h wait , is a one to one relation chip, do you have >> >> I think you might be much better finding a tutorial for the version of >> rails you are using however. �If it is out of date you will forever be >> coming up against

[Rails] Re: problem with the "detail"-method

2010-09-23 Thread Ar Chron
Sven Wildermann wrote: > class FormController < ApplicationController > def index > @form = Form.find(:first) > @form.update_attributes(params[:form]) > > @detail = @form.detail > @detail.update_attributes(params[:detail]) > end > end > IIRC, given the code above as the main

[Rails] Re: how to remote function to get info from url in a javascript function

2010-09-23 Thread Marnen Laibow-Koser
Shawn Bright wrote: > hey all > > I am working with a javascript function called Elabel, part of the > Google maps api > the Elabel has a function called setContents(html) > > i need to be able to call this function and get new html for it. ( the > html is a table that displays weather data) I d

[Rails] Re: Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"

2010-09-23 Thread Marnen Laibow-Koser
nobosh wrote: > I was able to use > gem 'nested_set' > Which got it working, now I just need to understand the rlt, lft > stuff. http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby

[Rails] problem with complex function to save in db

2010-09-23 Thread TEREN
hello there, i have a problem. i have my own complicated way that i want(must) save in the db i have a form for some table ("factions" in my cans, each field in the form goes to a single row of the "faction_contents" table, and then the id of that row goes to the table "factions" in the row of whic

Re: [Rails] Re: Util.html_escape() in erb file

2010-09-23 Thread radhames brito
html_scape does that , you are causing the output -- 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 rubyonrails-talk+unsu

[Rails] Re: Util.html_escape() in erb file

2010-09-23 Thread Phillip
Don't do anything and the escaped characters will appear as you intend. in view code: <% text = "  LetterAttack... is what i say" -%> <%= text -%> renders like this:   http://www.blahblah.org/blah";>LetterAttack... is what i say On Sep 23, 4:32 am

Re: [Rails] Re: superclass mismatch for class Tempfile

2010-09-23 Thread Rodrigo Felix
OK, but how can I know which class is instantiating TempFile or DelegateClass? I guess it is related to some plugin, but I`m not sure. Att. * Rodrigo Felix de Almeida* Promine Tecnologia da Informação - www.promine.com.br Project Manager Sun Certified Java Programmer On Thu, Sep 23, 2010 at 1:4

[Rails] errors.add, setting the whole message

2010-09-23 Thread Max Williams
Hi all. I have an attribute, job_role_id_short, that is being set in a form. This field has a custom validation on it, which does this if it fails: self.errors.add(:job_role_id_short, "cannot be blank") I want to add the error onto the attribute, so that the form builder will wrap the field i

[Rails] Re: problem with the "detail"-method

2010-09-23 Thread Sven Wildermann
On 23 Sep., 12:02, Colin Law wrote: > On 23 September 2010 10:52, Sven Wildermann wrote: > > > > > > > On 23 Sep., 11:26, Colin Law wrote: > >> On 23 September 2010 09:42, Sven Wildermann > >> wrote: > > >> > On 23 Sep., 10:36, Colin Law wrote: > >> >> On 23 September 2010 09:25, Sven Wilde

Re: [Rails] sou novato por aqui,

2010-09-23 Thread Luciano Sousa
http://groups.google.com/group/rails-br 2010/9/23 Виталий Янчук > Моя твоя не понимать ! > > 2010/9/23 João Ricardo > > o grupo de RoR é em português? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group,

[Rails] can not get css file when unicorn running in production mode

2010-09-23 Thread Lewis
Dear all I'm newbie to unicorn server. recently I got a problem when I was trying to run unicorn in production model. like command `unicorn -E production`. then I lost all my css styles in the browser. But everything works fine when I just type `unicorn` when unicorn running in the production

[Rails] how to i force apche to handle download requestrunning apach

2010-09-23 Thread Amit Tomar
hii all, Am running apche as frontend to mongrel ,i added these line in Apache's httpd.conf file LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_http_module modules/mod_

Re: [Rails] sou novato por aqui,

2010-09-23 Thread Виталий Янчук
Моя твоя не понимать ! 2010/9/23 João Ricardo > o grupo de RoR é em português? > > -- > 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 g

[Rails] sou novato por aqui,

2010-09-23 Thread João Ricardo
o grupo de RoR é em português? -- 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 rubyonrails-talk+unsubscr...@googlegrou

  1   2   >