Hassan is correctly encouraging you towards the higher-level abstractions, like
a Gem specifically written for this purpose.
If you really want to know how to make outgoing http requests, the answer is
the Net::HTTP Ruby library, which is documented here:
On Wed, May 31, 2017 at 10:39 AM, Joe Guerra wrote:
> How about passing the parameters in the url? and opening up the canada post
> site with that?
You can certainly do that, if one of the gems doesn't meet your needs.
Have you read the Canada Post API docs?
--
Hassan
Ok, I'll try the gem.
How about passing the parameters in the url? and opening up the canada
post site with that?
Thanks,
Joe
On Wednesday, May 31, 2017 at 1:36:20 PM UTC-4, Hassan Schroeder wrote:
>
> On Wed, May 31, 2017 at 10:27 AM, Joe Guerra > wrote:
> > Hmm,
On Wed, May 31, 2017 at 10:27 AM, Joe Guerra wrote:
> Hmm, which gem would allow you to perform http requests within Rails? I
> would like to send a request to the canadapost website and pass it some
> parameters and return a shipping total.
>
> I do believe there is a
Hmm, which gem would allow you to perform http requests within Rails? I
would like to send a request to the canadapost website and pass it some
parameters and return a shipping total.
I do believe there is a canadapost gem, but I'm not sure how upto date it
is.
I guess the other option is to
First of all, thank you for your quick reply!!!
The relation is a bit complex:
in the investment's model there is this relation:
belongs_to :project, :class_name => "Baseline", :foreign_key => :baseline_id
this is the relation between investment and project
Em quarta-feira, 31 de maio de 2017
What is the relationship between a club and a press release? Does a club have
many press releases? Start with the real-world relationship, then add that
relationship to your Rails models. The answer will suggest itself.
Walter
> On May 30, 2017, at 10:57 PM, fugee ohu
Hi João,
The problem is that you don't have a field called 'projects.id' in the
'investments' table. Does your investment model *belongs to one* project?
Then you would do
Investment.revenues
.where(project_id: @projects.map { |p| p.id })
.includes(:expenses, baseline: [:project,
Hi, there.
I'm trying to solve a problem that previously worked on rails 3.2 and isn't
in rails 4.2:
The query is the following:
Investment.revenues
.where('projects.id IN (?)', @projects.map { |p| p.id })
.includes(:expenses, :baseline => [:project, :coordinator]).
9 matches
Mail list logo