Hi!
I suggest you look at soap4r. Here you will find Geting started
guide:
http://markthomas.org/2007/09/12/getting-started-with-soap4r/
- Oto
On 17 feb., 21:20, binu agarwal.bin...@gmail.com wrote:
I have an existing restful rails application. I need to add a new API.
This new API will be
On 18 February 2011 05:24, Victor S victor.s...@gmail.com wrote:
Why doesn't this phone validation work?
validates_format_of :phone, :with = /^\([0-9]{3}\)[-. ]?[0-9]{3}[-.
]?[0-9]{4}|^[0-9]{3}[-. ]?[0-9]{3}[-. ]?[0-9]{4}$/,
:message = is not a phone number
tested with
Hi. I have a project based on Rails 3.0.3 and MySQL.
There are 2 tables (not all columns shown):
1. users (id, name, group_id)
class User ActiveRecord::Base
belongs_to :groups
end
2. groups (id, name)
class Group ActiveRecord::Base
has_many:users
end
Console output:
On 17 February 2011 21:50, jsmax popov@gmail.com wrote:
irb(main):001:0 User.first
= #User id: 1, name: John Smith, group_id: 3
How can i do that besides the group_id: 3 result the query will
return the Group name too. For example:
Have a look at the documentation:
On 17 February 2011 21:50, jsmax popov@gmail.com wrote:
Hi. I have a project based on Rails 3.0.3 and MySQL.
There are 2 tables (not all columns shown):
1. users (id, name, group_id)
class User ActiveRecord::Base
belongs_to :groups
That should be :group (singular), user
If you are a non profit organization, you have a chance to obtain a nice
html to pdf converting library - PD4ML for
Ruby for free from http://pd4ml.com/. Just contact them.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
Thank you. I suspect as much. Would this be a worthwhile or nice to
have feature?
On Feb 17, 10:26 pm, Jim Ruther Nill jvn...@gmail.com wrote:
I don't think so, have you tried it and checked the html (View Page
Source or similar in the browser). The line
__%= render 'unindented' %
says
I'm using Rails 3. Erubis is using some XML::Builder with indent set
to 2.
I suspect Haml won't be of help either, since it'll delegate to Erubis
at some point.
the %- only unindents a block to align with its closests %= render
parent. Can't go further than that.
On Feb 17, 11:08 pm, djangst
On 18 February 2011 11:09, khoan huu.khoa.ngu...@gmail.com wrote:
I'm using Rails 3. Erubis is using some XML::Builder with indent set
to 2.
I suspect Haml won't be of help either, since it'll delegate to Erubis
at some point.
the %- only unindents a block to align with its closests %=
I have tried:
_form.erb:
% form_for ... do %
__%- safe_concat 'textareathis is unindented/textarea %
% end %
which would output:
html ...
__form ...
__textareathis is unindented/textarea
__/form
/html
On Feb 18, 4:05 am, Colin Law clan...@googlemail.com wrote:
On 17 February 2011 11:26, Jim
On 18 February 2011 11:13, khoan huu.khoa.ngu...@gmail.com wrote:
I have tried:
_form.erb:
% form_for ... do %
__%- safe_concat 'textareathis is unindented/textarea %
% end %
which would output:
html ...
__form ...
__textareathis is unindented/textarea
__/form
/html
The question is
Controller Delivery:
def create
@customer = Customer.find(params[:customer_id])
@delivery = @customer.deliveries.build(params[:delivery])
@document = @customer.build_document(params[:document])
if @delivery.valid? and @document.valid?
Delivery.transaction do
I use Fedora.
I have installed ruby, rubygems, rails, sqlite-devel
Ruby 1.8.7
Rails 3.0.4
gem 1.5.2
#gem install sqlite3
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
Hi,
I'm not sure if I had your same issue, but I had a similar error
message when the table's name changes dynamically. In order to fixed I
used a real SQL statement directly and it worked, I didn't waste time
trying to figure what was the problem, I fear. For example:
On 18 February 2011 11:28, Mauro mrsan...@gmail.com wrote:
Controller Delivery:
def create
@customer = Customer.find(params[:customer_id])
@delivery = @customer.deliveries.build(params[:delivery])
@document = @customer.build_document(params[:document])
if @delivery.valid? and
You can use request.env['HTTP_REFERER']
On Fri, Feb 18, 2011 at 7:49 PM, Colin Law clan...@googlemail.com wrote:
On 18 February 2011 11:28, Mauro mrsan...@gmail.com wrote:
Controller Delivery:
def create
@customer = Customer.find(params[:customer_id])
@delivery =
Hi.
I'm trying to output an object as XML.
When it contains special characters, the XMLSerializer encodes them as HTML
entities.
How to disable that for accents, since my XML file is UTF-8 and does not
need that?
Thanks.
--
You received this message because you are subscribed to the Google
Hi all,
I need to include externel javascript and stylesheets into html
using nokogiri anyone plz tell me the syntax for the same.
--
*Thanks Regards,*
*RAFI,*
*
*
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To
in _form.html.erb there is submit button
%= f.submit %
the button is labeled Update Tablename.
Can someone tell me, how to change it and what exatly happens, when i
press submit?
BR
Rogi
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To
On Feb 18, 12:24 pm, rogi patrik.kel...@googlemail.com wrote:
in _form.html.erb there is submit button
%= f.submit %
the button is labeled Update Tablename.
Can someone tell me, how to change it
If you pass a string to f.submit that will override the default label
and what exatly
use
f.submit 'Your custom label'
to override. After pressing the button, you will be passed to the action of
the form of the button you pressed.
On Fri, Feb 18, 2011 at 8:24 PM, rogi patrik.kel...@googlemail.com wrote:
in _form.html.erb there is submit button
%= f.submit %
the button is
It will update the record with the data from _form.html.erb when u press
it.
--
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
is it a version manager your want, something that lets you go back to a
previous page version?
--
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
Look at the html of the form, it says for example
action= user/create method=post
it means the form will be send to the server with a post to the path
user/create
rails router it RESTful (read about
RESThttp://en.wikipedia.org/wiki/Representational_State_Transfer),
if you type rake route in the
On 18 February 2011 12:32, seeni khan rafigl...@gmail.com wrote:
It will update the record with the data from _form.html.erb when u press
it.
Not necessarily. It will initiate the action specified or implied by
the form_for statement. Whether that updates a record or not depends
on what is
if request.env['HTTP_REFERER'] == new_costumer_url
--
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
I've gone through about a couple of hours of building it up and tearing it
down, I need someone else's brain on this one please...
--
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
On 18 February 2011 11:53, Jim Ruther Nill jvn...@gmail.com wrote:
You can use request.env['HTTP_REFERER']
I would advise against that method. The view should not be making
decisions based on where it came from, it should be displaying what it
is told to display. If a particular action (create
To be a bit more clear about how I see the problem: as I said earlier,
http://www.rubular.com/ validates the correctness of the expression, I've
tried similar expressions in JS parsers, .NET parsers, Python parsers, they
all pass, I think it's the rails parsers that fails, and/or something
You might just want to see what Facebook's 'like' button does, but I don't
know how this is a Rails questions. Unless you use Rails to fill in the
parameter for the like button's message that Facebook then uses to fill in
the user's wall with...
--
You received this message because you are
if you're on a mac, get homebrew, then type in your terminal brew install
mysql
--
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
On 18 February 2011 13:02, Colin Law clan...@googlemail.com wrote:
On 18 February 2011 11:53, Jim Ruther Nill jvn...@gmail.com wrote:
You can use request.env['HTTP_REFERER']
I would advise against that method. The view should not be making
decisions based on where it came from, it should be
I have tested a simpler version and noticed this:
ruby-1.9.2-p136 :010 /^\(?[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}$/ =~
1234567890
= 0
ruby-1.9.2-p136 :011 /^\(?[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}$/ =~
(123)4567890
= 0
ruby-1.9.2-p136 :012 /^\(?[0-9]{3}\)?[-. ]?[0-9]{3}[-.
Hi Victor,
On Fri, Feb 18, 2011 at 7:03 AM, Victor S victor.s...@gmail.com wrote:
To be a bit more clear about how I see the problem: as I said
earlier, http://www.rubular.com/ validates the correctness of the
expression, I've tried similar expressions in JS parsers, .NET parsers,
Python
Bah! Much ado about nothing, I'm pretty sure now that the problem is that
the database record only accepts integers for the phone column. I just
checked the schema file, should have done that much earlier!
--
You received this message because you are subscribed to the Google Groups Ruby
on
I do wish there was a different error message/exception raised if something
like this happened rather than a failed validation, since validations ca be
written to be independent of db column types and therefore not a reflection
of what is acceptable to the database...
--
You received this
If you want and IDE go with RubyMine, hands down best ruby IDE ever. If you
just want to keep it simple (sic) use vim...
--
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
Store this info in flash
flash[:success] = Consegna effettuata.
flash[:redirect_from] = :something
respond_with(@customer)
Then you can read it later.
Robert Pankowecki
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this
On Fri, Feb 18, 2011 at 9:02 PM, Colin Law clan...@googlemail.com wrote:
On 18 February 2011 11:53, Jim Ruther Nill jvn...@gmail.com wrote:
You can use request.env['HTTP_REFERER']
I would advise against that method. The view should not be making
decisions based on where it came from, it
Not a version manager
Its more about selecting content for different circumstances
Being able to cache different versions for a page/url and select it in
logic contained in a Action Cache wrapper seems the most appropriate
I'm just wondering if anyone knows of example of extending Action
Cache
On Feb 17, 11:01 am, Bhasker Harihara harihara.bhas...@gmail.com
wrote:
Hi All,
Is it necessary to have a separate controller for each sub-menu and
sub-sub-menus.
I want the nav buttons of the main section and the sub-menu point to each
other, is this possible with rails partials ?
Is
hi everybody ,
i am trying to test a simple webapplication but got the following
error :
molay@molay-VirtualBox:~$ gem install mysql2
Building native extensions. This could take a while...
Successfully installed mysql2-0.2.6
1 gem installed
Installing ri documentation for mysql2-0.2.6...
I guess this could also be done by implementing some sort of Fragment
Cache... wrapping a whole page
Just not sure where to begin... I don't want to reinvent rails
caching... just want to tweak it with a simple conditional + have
control on the file cache storage
--
You received this message
On 18 February 2011 13:42, Victor S victor.s...@gmail.com wrote:
I do wish there was a different error message/exception raised if something
like this happened rather than a failed validation, since validations ca be
written to be independent of db column types and therefore not a reflection
More on this problem:
https://rails.lighthouseapp.com/projects/8994/tickets/6450-arel-generates-invalid-sql-when-using-distinct-on-in-postgresql
--
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 usually use rake gems:unpack to gain access to the source of my gems while
developing. I find it to be a very easy way to dig into what a gem expects or
to see how it works inside. I was trying out Hobo edge on Rails 3, and hit a
bug I wanted to fix, but couldn't find an equivalent way to get
Could you just do something like this:
% cache(:action = list, :controller = blah, :style = new) do %
# code that renders in either mode conditionally
% end %
You could also look at using something like cells, which has caching built in
and might be flexible enough to cache and render 2
Hi Paul,
I shall def. have a look at it soon, currenlty my Centos has problem and not
able to view any mov files.
Warm Regards,
On Fri, Feb 18, 2011 at 8:34 PM, paul h p...@hollyer.me.uk wrote:
On Feb 17, 11:01 am, Bhasker Harihara harihara.bhas...@gmail.com
wrote:
Hi All,
Is it
Hi,
I think you have to install mysql development stuff first.
In Centos I had the same problem, after i installed mysql-devel, I could
install mysql without any erros.
Cheers,
On Fri, Feb 18, 2011 at 12:39 PM, deadnuker jmejia...@gmail.com wrote:
I have Xcode 3.0+ installed
Ruby 1.9.2
And
Yes, but I think toggling is better solution. Alternatively you can
include another JavaScript library, I suggest script.aculo or jQuery.
http://madrobby.github.com/scriptaculous/effect-fade/
If you want to AJAXify first do everything without it. As soon as it
works you can change part by part to
Yes, but Facebook Like doesn't do what I need. I really need to post to the
user's wall.
Any other suggestions?
--
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
rails.n...@gmail.com wrote in post #982493:
I guess this could also be done by implementing some sort of Fragment
Cache... wrapping a whole page
Just not sure where to begin... I don't want to reinvent rails
caching... just want to tweak it with a simple conditional + have
control on the
Hi,
I am setting up SMTP for my Rails 3 App.
This configuration works.
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address = smtp.gmail.com,
:port = 587,
:domain = mydomain.com,
:user_name=
ROR newbie here...
I'm trying to build a form to upload a CSV file, then parse and store the
data. I have debugged this code up this point, but now when I browse to my
csv file, and click Upload, I get this error:
Missing template uploads/process_file.html.erb in view path...
Here is my
I'm working with a legacy schema in which almost all the column names
are
uppercase, the primary key field name is 'ID' and it's data type is
'uniqueidentifier'.
SQL Server 2008
Ruby 1.8.7
ActiveRecord 3.0.3
activerecord-sqlserver-adapter 3.0.9
arel 2.0.8
Windows XP
When I try to create a model
+1 on RubyMine. I've just used it about a month now, but I like it
better than Eclipse or NetBeans.
On Fri, Feb 18, 2011 at 8:51 AM, Victor S victor.s...@gmail.com wrote:
If you want and IDE go with RubyMine, hands down best ruby IDE ever. If you
just want to keep it simple (sic) use vim...
--
+1 for RubyMine
Like others have said, it really depends on personal preference. I'm coming
from a .net environment, so and IDE is a bit more familiar for me. But I
have also tried Komodo Edit, and TextMate, and have enjoyed using them
both.
Jason
On Fri, Feb 18, 2011 at 1:32 PM, Paul
Red Dirt RubyConf Program and Registration
We are proud to announce the Red Dirt RubyConf 2011 program.
http://reddirtrubyconf.com/schedule
Red Dirt is a content rich two-day conference to be held in Oklahoma
City
on April 21st and 22nd, 2011. The conference program focuses on four
themes
On 18 February 2011 14:39, Jim Ruther Nill jvn...@gmail.com wrote:
On Fri, Feb 18, 2011 at 9:02 PM, Colin Law clan...@googlemail.com wrote:
On 18 February 2011 11:53, Jim Ruther Nill jvn...@gmail.com wrote:
You can use request.env['HTTP_REFERER']
I would advise against that method. The
On 18 February 2011 19:38, jason white jasonwhite...@gmail.com wrote:
+1 for RubyMine
Rubymine is not free, I have to paid for it.
--
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
Same problem here, also only crawlers who use text/* (on a Rails 3.0.4
application)
text/* should of course render the format.html in most cases.
I also had an instance of a request (on a Rails 3.0.0 application) which
only accepted application/jxw, in which case Rails should have thrown a
406
soap4r hasn't had a release since September 2007
(http://rubygems.org/gems/soap4r), so that might not be the best option.
If you don't need any fancy WS-standards then you could also simply
create a controller for it and render the appropriate XML responses
yourself.
On 18-2-2011 9:17, Oto
On 18 February 2011 19:59, Mauro mrsan...@gmail.com wrote:
On 18 February 2011 19:38, jason white jasonwhite...@gmail.com wrote:
+1 for RubyMine
Rubymine is not free, I have to paid for it.
So stick to Redcar then. The OP asked which editor is good that i can
use, there's was no stipulation
While I am guessing you've already solved your problem (because it was
related to your database schema) I'll still answer your regular
expression questions:
The number returned is the position of the string where your regular
expression matches, 0 is the start of the string.
nil means no
Hello, I'm currently using the gem 'nested_set' for comment threading.
What I want to do is prevent the comment level from going more than 2 levels
deep. What I tired doing was something like this:
class Comment ActiveRecord::Base
before_save
http://neeraj.name/2010/11/23/mime-type-resolution-in-rails.html provides
more info.
--
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,
+1 RubyMine
On Fri, Feb 18, 2011 at 1:32 PM, Paul p...@nines.org wrote:
+1 on RubyMine. I've just used it about a month now, but I like it
better than Eclipse or NetBeans.
On Fri, Feb 18, 2011 at 8:51 AM, Victor S victor.s...@gmail.com wrote:
If you want and IDE go with RubyMine, hands down
I'm trying to follow an example from 'Agile Web Development with Rails' (3rd
ed) which shows how to upload an image file, except that I'm trying to
upload a csv file.
The 'magic' that the example shows is how the file_field helper method can
say file_field(uploaded_file) when there is actually
where do i find those dev tools?
--
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
Your setter needs to be same name as the field that rails is looking for.
--
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
the line
redirect_to :action = index
should be
redirect_to :action = :index
or is it just a typo? i don't know why it's not throwing an error
complaining that there's no index variable so maybe it's just a typo.
On Sat, Feb 19, 2011 at 2:22 AM, rixter caseyr...@gmail.com wrote:
ROR newbie
I have to comunicate with a SOAP service and am having some problems
with properly connecting to it, im currently using savon but, I have
to do a lot of work with a gem like that, it doesnt really uses the
wsdl much so is almost as building the xml from scratch. anyone has
experience dealing with
In my case (CentOS 5.5) i id a
$sudo yum -y install mysql-devel
On Sat, Feb 19, 2011 at 4:55 AM, deadnuker jmejia...@gmail.com wrote:
where do i find those dev tools?
--
You received this message because you are subscribed to the Google Groups
Ruby on Rails: Talk group.
To post to this
Thanks, it works, the thing is that i did thing that the _index.js.erb
is for put all the javascript,but
now i see that i just to work for ajax things, i think it was a way to
organize javascrit code.
On Thu, Feb 17, 2011 at 7:03 PM, Jim Ruther Nill jvn...@gmail.com wrote:
the line
format.js
I've been a Rails developer for a couple years now, and of course,
having recently moved out from under my rock, have been hearing lots
about Rubinius. My question to the community is, why use Rubinius at
this point in time?
I've heard that it's supposedly going to have some pretty serious
I have a system where uploads are stored in a database with a filename
based on the MD5 hash of the file contents. Following the logic of this,
I assigned upload_file_name to be a unique index in my migration.
What I want to do is, whenever a user tries to upload a file whose md5
hash already
soap4r can do a lot of the work for you, but there hasn't been a release
of it since 2007. I'm not sure if it will function properly with newer
versions of Ruby and/or Rails (I've heard of people having problems with
soap4r, but I don't have any proof for you).
If you're using JRuby then it
It is funny. The last time I followed a long thread about rails
editors, the enthusiasm seemed to be for emacs. So I installed it and
got used to it. It has some very good features, the first time I
installed it I had trouble setting up the packages I needed for rails/
haml etc. But recently
78 matches
Mail list logo