On 24 Mar., 02:51, Pierre Pierre
wrote:
> Jeff Emminger wrote:
> > perhaps you need
>
> > require 'wxruby2'
>
> > in your code? or maybe
>
> > require 'rubygems'
> > require 'wxruby2'
>
> > On Mar 23, 1:08?am, Pierre Pierre
>
> I have the "require" in my code.
> I somehow imagine that i
Hi, I am a newbee to rubyonrails. I was given task of migration of
database from mysql to oracle for a ror application.
My probelm is when I go into my environment.rb file and uncomment the;
config.action_controller.session_store = :active_record_store
my application doesnt work atall. I do hav
> Why not create your method as a module and then include it into the
> classes you need it? Look at any of the plugins out there that are of
> the "acts_as_" variety which add methods to the model they are
> called from... just follow those examples and you shouldn't need to
> direct
I thought I would include the sessions controller too, just in case it
helps:
# This controller handles the login/logout function of the site.
class SessionsController < ApplicationController
# Be sure to include AuthenticationSystem in Application Controller
instead
# render new.rhtml
Hi,
I am having a really tough time figuring this out. I followed the
tutorial below to add a RESTful authentication to a Ruby application
that tracks projects (just a title and a url). The tutorial is for a
blog, but I just changed blog to projects
http://ruby.about.com/od/rubyonrails/ss/rail
Thanks Phillip. I will follow your advice and see if I can do it.
--
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 e
Jeff Emminger wrote:
> perhaps you need
>
> require 'wxruby2'
>
> in your code? or maybe
>
> require 'rubygems'
> require 'wxruby2'
>
>
> On Mar 23, 1:08?am, Pierre Pierre
I have the "require" in my code.
I somehow imagine that it's the console which doesn't look it the
correct pat
hi,
I have simple has many through association which is working without
problem on ruby 1.8.6 and rails 2.0.2, but on ruby-enterprise with
ruby 2.0.2 or 2.3.2 it just does not see "through" part of
association.
class User < ActiveRecord::Base
has_many :userships
has_many :user_groups, :throug
No, Rails-2.2.0 - Rails-2.3.1 are not supported.
2009/3/24 Leon :
>
> does this version support rails 2.2.x?
>
> On Mar 22, 9:24 pm, Masao Mutoh wrote:
>> Hi,
>>
>> Ruby-GetText-Package-2.0.0 is now available.
>>
>> Ruby-GetText-Package now separate 2 base libraries
>> and 3 libraries which supp
does this version support rails 2.2.x?
On Mar 22, 9:24 pm, Masao Mutoh wrote:
> Hi,
>
> Ruby-GetText-Package-2.0.0 is now available.
>
> Ruby-GetText-Package now separate 2 base libraries
> and 3 libraries which support Ruby on Rails 2.3.2.
>
> For all libraries/applications:
> * locale - Manage
On Mar 23, 2009, at 5:09 PM, Bharat Ruparel wrote:
>
> I am trying to monkey-patch the ActiveRecord::Base class to
> incorporate
> a generic search class method so that it can be used by all model
> classes which need this functionality. Since model classes directly
> inherit from ActiveRecor
1. Upgrade to latest 2.0.x release, run all of your tests, fix any failures,
address any deprecations.
2. Upgrade to latest 2.1.x release, run all of your tests, fix any failures,
address any deprecations.
3. Upgrade to latest 2.2.x release, run all of your tests, fix any failures,
address any depr
I am trying to monkey-patch the ActiveRecord::Base class to incorporate
a generic search class method so that it can be used by all model
classes which need this functionality. Since model classes directly
inherit from ActiveRecord::Base and unlike controllers and helpers, do
not have an ancestor
I would highly recommend
"ruby for rails" as a starter book
followed by
"The Rails Way" for Rails 2.0 as an excellent definitive source on
most topics.
-gs
On Mar 21, 5:12 pm, Power One
wrote:
> I'm trying to learn how to use ruby on rails. Just two weeks ago I'm
> learning how to program in
Hello,
I have an application I did in 2007 in Rails 1.2.6. It was my first
one -- so I am sure the code could be improved and better refractored.
If I wanted to upgrade the application to 2.3.2 and hopefully improve
it -- how would you suggest I tackle this? Any advice would be great.
Elle
--~--
Here's what I ended up doing, and it works out as expected:
http://gist.github.com/83829
On Mar 23, 12:03 pm, Party Drone wrote:
> Still haven't quite figured this out…
>
> On Mar 20, 5:09 pm, Party Drone wrote:
>
>
>
> > I think I have a start with this:
>
> > DownloadType.all(:include => :do
>
> Thanks a lot i will try
>
--
GOOOL!!!
--~--~-~--~~~---~--~~
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 unsubscrib
Spec::Rails people,
I'm curious about:
- model.should have(1).error_on(:attribute)
displayed in the URL below:
http://rspec.rubyforge.org/rspec-rails/1.2.2/classes/Spec/Rails/Exten...
The Rspec peepcode screencast suggests that
model.should have(1).error_on(:attribute)
should pass if
model.sen
>> However, I wonder if it could be done within the "find" method ?
>
> Not really. By definition if you group using the database then you
> only get back one row for each value of the grouped column - that's
> just what group does in database and you want something else.
>
> Fred
I see, than
On Mar 23, 9:31 pm, James Byrne
wrote:
> I have this controller code:
> ...
> field_array.each do |f|
> f = f.to_sym
> model.send("#{f}=", "#{parm_hash[f]}") if
> model.attribute_present?(f)
> end
> return model
> ...
>
> field_array is an array of attribute n
I have just installed rails thru Curt Hibbs installment file
(InstantRails 1.3a zip).
I am trying to create the required directories for a demo application
named "shovell".
I opened the ruby console and I ran "rails shovell"
I get the following errors.
"C:/InstantRails/ruby/lib/ruby/gems/1.8/gem
this may seem silly but i just noticed that if in mysql the column
which is a tinyint(1) happens 2 or greater, by a chance of glitch or
corruption in the database(i did it manually ofcourse but i am
speaking hypothetically), rails would see it as false. but i find that
really wrong seeing how in m
I have this controller code:
...
field_array.each do |f|
f = f.to_sym
model.send("#{f}=", "#{parm_hash[f]}") if
model.attribute_present?(f)
end
return model
...
field_array is an array of attribute names as strings.
parm_hash is the params hash returned from the
On Mar 23, 8:26 pm, jzimmek wrote:
>
> u = User.new
> u.address = Address.new
> u.save
>
> NoMethodError: You have a nil object when you didn't expect it!
> The error occurred while evaluating nil.needs_street_validation?
> from app/models/address.rb:3
>
> seems to me like we cannot refer
This is a code sample of what I have made so far:
New Report for <%= @way.road.name%>, <%= @way.name%>
<%= form_tag :action => :create, :id => @way.id%>
Date: <%= datetime_select("report", "time") %>
Priority:
<%= radio_button("report", "priority", 1) %> high -
<%= radio_butto
Google Summer of Code student applications start today!
College students: follow your open source passion this summer and let
Google foot the bill. Google Summer of Code (GSoC) is a global program
that offers student developers stipends to write code for various open
source software projects.
Ru
Thank you Freddy. That wasn't exactly what I needed to do, but the
screencasts helped me in another case.
What I actually need to do is simpler: create multiple Reports at the
same time. Each report has a description with a textfield and I have
to associate it with a different segment. That's all
i really like the declarative model-based validation in rails, but i
run into trouble while doing some real world (more complex) stuff.
class User < ActiveRecord::Base
belongs_to :address
accepts_nested_attributes_for :address
def needs_street_validation?
true
end
end
class Address <
perhaps you need
require 'wxruby2'
in your code? or maybe
require 'rubygems'
require 'wxruby2'
On Mar 23, 1:08 am, Pierre Pierre
wrote:
> Folks,
>
> I'm not sure this is the best place to ask the following question, but
> someone might still know the answer.
>
> I currently can't inst
Bosko Ivanisevic wrote:
> First look at your config/database.yml. In newly created rails
> application you'll find location of your database file for all three
> environments (development, test and production). But this will not
> create your database. In order to create it run:
>
> rake db:creat
First look at your config/database.yml. In newly created rails
application you'll find location of your database file for all three
environments (development, test and production). But this will not
create your database. In order to create it run:
rake db:create
After that you'll find your datab
User.find(:all, :order => 'os')
:order sorts ascending by default. You can define the sort order
explicitly with ASC or DESC (i.e., 'os ASC' or 'os DESC').
On Mar 23, 8:21 am, Ayeye Brazov
wrote:
> hello,
>
> I need to group Users depending on their operating systems field "os",
> so I tried
Lots of good advice so far... I would also recommend checking out
Railscasts.com. Ryan Bates offers great Rails instructional videos for
free.
Really, the best way to learn is to just immerse yourself: start
building a blog or web application, watch Rails videos everyday, and
learn a different Ru
On Mar 23, 11:38 am, Frederick Cheung
wrote:
> On Mar 23, 2:21 pm, Ayeye Brazov
> wrote:
>
> > User.find(:all, :group => :os)
>
> > however, the result is an array having only one user for each os group.
> > I'd like to have ALL the users grouped by :os though
>
> > One solution is to write
>
>
On Mon, Mar 23, 2009 at 10:16 AM, Stefan La <
rails-mailing-l...@andreas-s.net> wrote:
>
> Jeremy Kemper wrote:
> > On Sat, Mar 21, 2009 at 7:52 AM, ruby.freeman
> > wrote:
> >>
> >> when I run console with ruby 1.9.1 and rails 2.3.2, and trying to do
> >> something like
> >>
> >> User.first.name
On Mar 23, 6:14 pm, Amitabh A wrote:
> I am running on Rails 2.2.2 on Solaris (and also on my mac) against
> mysql. For some reason, when I use a select in the partial, the
> database does not get updated with the changed value. I am using
> checkbox for other fields which works perfectly.
> I
On Mar 23, 6:14 pm, gustavo wrote:
> Hi,
>
> I have created the weblog in my house yesterday and uploaded to a
> SourceRepo svn repository. Today I started to work in other machine
> and checked out a version to another NetBeans. Somehow, the files
> inside the dir weblog/config/environments wh
Hi,
I am trying to deploy locally the application created in this
tutorial. But for normal apps, the apache doc root configuration
should point to the public directory. As the application doesnt have a
index inside the public, how should I config this?
Thanks!
Best Regards,
--~--~-~--~-
I am running on Rails 2.2.2 on Solaris (and also on my mac) against
mysql. For some reason, when I use a select in the partial, the
database does not get updated with the changed value. I am using
checkbox for other fields which works perfectly.
I can provide more information if needed, but I woul
hi dude
I am very much impressed on fleximage plugin functionality.
But practically facing many problem,
1. By default it stores in png type, which takes more space. Is there any
way to upload a file in jpg format.
Note: I know i can convert a file to jpg, by i want to convert at the
time o
Hi,
I have created the weblog in my house yesterday and uploaded to a
SourceRepo svn repository. Today I started to work in other machine
and checked out a version to another NetBeans. Somehow, the files
inside the dir weblog/config/environments where not uploaded with svn
yesterday: development.
On Mar 23, 2:21 pm, Ayeye Brazov
wrote:
> User.find(:all, :group => :os)
>
> however, the result is an array having only one user for each os group.
> I'd like to have ALL the users grouped by :os though
>
> One solution is to write
>
> User.find(:all).group_by{|u| u.os}
>
> However, I wonder
This sounds right to me... find the SQL it generated in your .log and
execute it in a mysql console... is the output the same?
On Mar 23, 10:21 am, Ayeye Brazov
wrote:
> hello,
>
> I need to group Users depending on their operating systems field "os",
> so I tried
>
> User.find(:all, :group =>
Have you tried using the following in your controller?
session_options['cookie_only'] = false
I think that will work, I just don't know how to specify which methods
I want to apply the option.
On Mar 23, 6:04 am, hawkerb wrote:
> I am having exactly the same problem. However, for me, old:
>
but the point is that it's a find_or_create, and the index is on
[:parent_id,:name],
so it should just find the record if it's a duplicate.
Also, the following worked:
Child.find_or_create_by_parent_id_and_name(1,"foobar")
On Mar 23, 2:10 pm, jemminger wrote:
> The name 'foobar' exists already
Hello,everybody.
I started to use ext_scaffold recently, and I read this article,could
set up form.
http://jonathanbarket.com/post/78831424/simple-associations-with-ext-scaffold
But, I cannot search country name from manufacture form.
I want to attach file through ext_scaffold.
How can I solve th
The name 'foobar' exists already?
On Mar 23, 1:36 pm, klochner wrote:
> Anyone have insight on this one?
>
> class Parent
> has_many :children
> end
>
> add_index "children", ["parent_id", "name"], :name =>
> "by_parent_name", :unique => true
>
> a = Parent.find(1)
> a.children.find_or_create
anything people know http://propertyind.blogspot.com/ look this one
--
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
pepe wrote:
> Hi there,
>
> I've never done something like that but I can imagine you could do the
> validation in your controller. When the action is invoked you can
> check the values received in the params hash and act accordingly.
>
> Pepe
>
> On Mar 21, 12:42�pm, Rails List
Thanks a mill
On 23 Mar 2009, at 17:44, Hans wrote:
>
> Rails mysql performance
>
> I have an application that reads an xml file, parse it and from there
> updates the database. My models has many associations and there are a
> lot of creation of new records in the database. The performance is
> slow and my
Still haven't quite figured this out…
On Mar 20, 5:09 pm, Party Drone wrote:
> I think I have a start with this:
>
> DownloadType.all(:include => :downloads, :joins => [:downloads
> => :products], :conditions => ['product.id = ?', id], :order =>
> 'position, download.title')
>
> But I get the fo
Rails 2.3.2
This seems related specifically to the suffices _type and _value.
Attributes ending in either of these strings are not processed by the
attribute= method. if #write_attribute("something_type", "a value") is
called instead, then the somthing-type= method is again bypassed and the
Rails mysql performance
I have an application that reads an xml file, parse it and from there
updates the database. My models has many associations and there are a
lot of creation of new records in the database. The performance is
slow and my analyses shows that mysql is to blame.
In a separat
Anyone have insight on this one?
class Parent
has_many :children
end
add_index "children", ["parent_id", "name"], :name =>
"by_parent_name", :unique => true
a = Parent.find(1)
a.children.find_or_create_by_name "foobar"
Mysql::Error: Duplicate entry 'foobar' for key 2: INSERT INTO
`children`
Jeremy Kemper wrote:
> On Sat, Mar 21, 2009 at 7:52 AM, ruby.freeman
> wrote:
>>
>> when I run console with ruby 1.9.1 and rails 2.3.2, and trying to do
>> something like
>>
>> User.first.name.encoding
>>
>> I'm getting #, though I've set "encoding: utf8"
>> in database.yml
>>
>> any suggestions
Try adding this to your mailer model:
ActionMailer::Base.delivery_method = :sendmail
Gary.
On Mar 21, 11:36 pm, Shelly wrote:
> Hi,
>
> I am trying to send emails out using ActionMailer. Currently, the
> console shows that everything is sending out correctly, but I am not
> actually receiving
Typically, when one creates a has_many associated table one does this:
hasone.hasmany.build({attribute hash},{attribute hash},..} or
hasone.hasmany.create({attribute hash}, ...
However, if mass assignment is turned off (attr_accessible => nil), then
I cannot seem to set the attributes directly.
What I have is something like this in my css:
.post-message {
word-break: break-all;
}
That does it for me...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this grou
I would probably set this in the web front-end (apache, etc) This is
where I do expires stuff. I have to be careful though since most of
the examples I've seen literally say to set it globally, but Rails
uses the public directory for caching as well.
For max age, I'd consider having Apache set
Now, i will teach you with my basic langguage...
let start to learn more about Indonesia
Saya = I,me
Kamu = You
Kita = Our
Mereka = They
Cinta = Love
and
Saya cinta kamu
I love you
More learn Indonesia
visit here
http://propertyind.blogspot.com/
--
Posted via http://www.ruby-forum.com/.
--~-
Hello Everyone,
I am an executive recruiter in Toronto, one of my long standing
clients have recently retained me to find a Rails developer. I have
included the posting below and please respond to me if you have
interest. Please note: this is a full time permanent role and
offers six weeks pa
Yeah, thanks, I did end up finding that and it has been helpful...
On Mar 22, 10:04 pm, JL Smith wrote:
> This should get you going...also check out the links at the end under
> "Resources".
>
> http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nest...
--~--~-~--~~
how do you think about my simple blog, please give your opinion for my
new
blog
visit here http://propertyind.blogspot.com/
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
Another similar method...
def show_flash
[:notice, :warning, :message].collect do |key|
content_tag(:div, flash[key], :class => "flash_#{key}") unless
flash[key].blank?
end.join
end
--~--~-~--~~~---~--~~
You received this message because you are subsc
I finally got TinyMCE to work beautifully and now am trying to
understand how I will bound my users' from not pushing the HTML beyond
the borders that I grant them.
For example, if I type;
999
Or something like this:
def flash_messages
messages = []
%w(notice warning error).each do |msg|
messages << content_tag(:div, html_escape(flash
[msg.to_sym]), :id => "flash-#{msg}") unless flash[msg.to_sym].blank?
end
messages
end
<%= flash_messages %>
--~--~-
hello,
I need to group Users depending on their operating systems field "os",
so I tried
User.find(:all, :group => :os)
however, the result is an array having only one user for each os group.
I'd like to have ALL the users grouped by :os though
One solution is to write
User.find(:all).group_
On Mar 23, 12:50 pm, Vince Gilbert
wrote:
> Hi all,
>
> I've been reading a ton, doing tutorial, and generally trying to learn
> Ruby on Rails.
>
> I have a question that I haven't been able to find the answer to.
>
> Where is the .db file that sqlite3 creates for Rails projects? I can't
> for
On Mar 23, 12:52 pm, Intern ruby
wrote:
> This is my code and I am trying to call remote function when somebody
> click on add button after selecting something from select_tag. Please
> tell me where I am wrong ? I am getting following error: Ajax not
> defined.
Probably means that your page d
In Jasper Reports,I am having one parameter,thats
Receipttype ..Receipt tyape mean Manifest,Nonmanifest,Both.f i gave
manifest Mean Maniefst datas will be printed and,if i gave Nonmanifest
mean nonmanifest datas will be printed and if i gave Both mean
Manifest and Nonmanifest datas will be printed
add one def in application_helper.rb
like :
def show_flash(flash)
html = ""
if flash[:error]
html += "#{flash[:error]}"
end
if flash[:warning]
html + = "#{flash[:warning]}"
end
if flash[:notice]
html += "#{flash[:notice]}"
end
end
then change in view.
fr
I can access with a proxy, thanks.
On Mon, Mar 23, 2009 at 3:38 AM, Chris Kottom wrote:
> http://wireless.fcc.gov/uls/data/complete/r_tower.zip seems to work for
> me. Maybe blocked from your location?
>
>
> On Sun, Mar 22, 2009 at 2:22 PM, Agustin Viñao <
> rails-mailing-l...@andreas-s.net> w
This is my code and I am trying to call remote function when somebody
click on add button after selecting something from select_tag. Please
tell me where I am wrong ? I am getting following error: Ajax not
defined.
<%= select_tag 'available_line_id[]',options_for_select(customers),{:id
=> 'ava
Hi all,
I've been reading a ton, doing tutorial, and generally trying to learn
Ruby on Rails.
I have a question that I haven't been able to find the answer to.
Where is the .db file that sqlite3 creates for Rails projects? I can't
for the life of me figure out how to access the database tables
Hi all,
Ive been googling for couple of hours and I just cant figure it out. I
want to set the max-age value to 300 for the WHOLE application,
regardless of development or production mode.
Is there anyone that knows?
Petr
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~-
How can I replace this with helper?
<% if flash[:error] %>
<%= flash[:error] %>
<% end %>
<% if flash[:warning] %>
<%= flash[:warning] %>
<% end %>
<% if flash[:notice] %>
<%= flash[:notice] %>
<% end %>
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~
welcome, you are here. just ask.
--~--~-~--~~~---~--~~
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
Hi to every one i m new to ruby on rails. I want to join this group
for get my question regarding RoR answered.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, sen
ok, thanks, I'll try that a bit later and report back.
bb
--
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
I noticed a funny thing, while doing this. We can not use it with an
Hash inside an array because the Hash elements will be spread all over
the array thanks to URL query brackets syntax for Arrays(if the array
index was specified in this syntax it would work, but I don't think
there is way to get
Hi,
can't seem to figure it out. I have text saved as UTF8 in my MySQL
database, and it shows up fine in the browser. However, I want to
export to pdf (pdf;writer) and csv-text. When I do that the accented
foreign characters do not show up.
I've tried to convert them before exporting, but I don't
Hi all,
I am new to RoR. At present I am working with Ajax. I have
doubt in place_editing.
Kindly please help me in this regard. I am struggling with
this for past one week.
Any help from your side will be very helpful.
I have a model called child_users. I am lis
I am having exactly the same problem. However, for me, old:
class ImagesController < ApplicationController
session :cookie_only => false
end
does *not* work anymore. TomRossi7, can you double check does it work
for you, please?
The only way I worked this around, is to get sessions directly fr
On 23 Mar., 10:01, bingo bob wrote:
> I was having great success with creating PDFs with prawn, I followed
> Ryan Bates latest screencast. All good.
>
> Trouble is when i come to deploy the app on my webhost I ran into
> trouble.
>
> Rails 2.3 app.
> I did, "sudo rake gem unpack prawn" to freez
I was having great success with creating PDFs with prawn, I followed
Ryan Bates latest screencast. All good.
Trouble is when i come to deploy the app on my webhost I ran into
trouble.
Rails 2.3 app.
I did, "sudo rake gem unpack prawn" to freeze it in.
I put the app on my webhost but it won't s
Write as
library = Library.new(params)
book = library.books.build(params)
library.save
Sijo
--
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
I have a URL parameter that has special characters on it, so I do URL
encoding as such:
my_url(:email => CGI.escape("someemail+extens...@mail.com")
Now, I would expect to call a CGI.unescape(params[:email]) on the
action receiving this parameter, and this is true according to my
functional tests
87 matches
Mail list logo