Ruby on Rails Monday, April 24, 2017

 You could also use https://harvesthq.github.io/chosen/ 

or

this http://stackoverflow.com/questions/39921381/adding-a-tag-if-it-doesnt-exist-in-rails-chosen-rails

google a little around I know I have done this a long time ago and it wasn't that hard.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/528da008-436a-4374-a509-dd8a7b742423%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, April 23, 2017

You can't have multiple objects for a form_for, it can only be one.

If you want to do a subobject, a fields-for is available.

On Tuesday, April 4, 2017 at 7:00:20 PM UTC-4, fugee ohu wrote:
<%= form_for[@user, @address], :url => users_addresses_set_current_path(current_user.id, a.id) do |f| %>

this doesn't work 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/67d318aa-9693-494a-a901-96debb0e4b6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi Falk,

I am not sure if you still need someone, but would be happy to discuss.

Manish


On Thursday, March 16, 2017 at 4:27:25 AM UTC-4, FALK LIEDER wrote:
Hi,    I am a cognitive scientist at UC Berkeley, and I would like to contract a  Rails developer to add a relatively simple feature to an existing Rails app.
I am happy to pay standard hourly rates according to your  qualifications. Your work would be contributing to scientific research  on how to alleviate the problem of procrastination and help people  become more productive.    Concretely, we have programmed an experiment to study procrastination.  The existing app presents participants with a todo list of writing  tasks. The feature I would like you to add is recording the participants  written responses to those assignments in the data base. The current  version of the app is fully functional and available on Github. There is  also a documentation for the existing code.    Please don't hesitate to contact me with questions or quotes.    I am looking forward to hearing from you!    Best wishes,    Falk Lieder
PhD candidate, Computational Cognitive Science Lab
UC Berkeley

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b20d329a-3a48-45f7-81df-2cdbbee80865%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

All,

I wanted to reach out that I have put my services out there for those that need it. 


If anyone has any needs, feel free to reach out, I would be happy to help.

Regards,

Manish

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c53bed24-9fec-4705-b029-1423598f4f43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Saturday, April 22, 2017

You can find more information for 'form_for' straight from the source:

http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html

Cheers

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8EbS%3Dk9RW3SG3%2Br7wKi7GmhNxRQNPrbye48oWuMUyiHvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Friday, April 21, 2017

Hello,
Does anyone knows if there is any Rails/ Ruby / Web / SysOps conference this year in UK or Scotland?

Any big user group meeting can work as well.

Thank you very much.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8FAeo-2DHMqCuYY7%3DP1dN7VypzyvQszz3%3DGso2Ym9Q-Hg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Fri, Apr 21, 2017 at 2:22 AM, Mugurel Chirica
<chirica.mugurel@gmail.com> wrote:
> Another very good option is to learn to use a debugger

Another +1 for Pry -- absolutely an essential tool.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAxqrW6GACCeYxadQ8ZAkSvJD_EWZHvW7QV%2BjwmS3pPjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 21 April 2017 at 10:22, Mugurel Chirica <chirica.mugurel@gmail.com> wrote:
> Another very good option is to learn to use a debugger (that can help you a
> lot until you learn Ruby / Rails better, but it can be useful then as well),
> is to have a look at Pry https://github.com/deivid-rodriguez/pry-byebug or
> for ruby 1.9.3 https://github.com/nixme/pry-debugger.

+1 to that.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLt9k3Ask5%3DcUfWUHtdRQ5i4QGp7025%3D0smy%3DtV3YC%3DuzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

resources :posts, param: :slug

FWIK this just changes the name of the parameter passed to the controller, so if you write post_path(Post.first) you will have a request like /posts/#{post.to_param} but in the controller instead of have param[:id] you have param[:slug]

--

Maurizio De Santis

2017-04-20 22:27 GMT+02:00 <batuhanwilhelm@gmail.com>:
You can also do something like this If i get it right,

resources :posts, param: :slug

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/rneoBmxG4QY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ffd0916e-d658-4cb9-b24f-c4b3ebb52454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2B_M_Jdcs3E51oQfc%2BAQpBbr%3D3KO9kMZOGn04pu2ATsUQUe_0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Another very good option is to learn to use a debugger (that can help you a lot until you learn Ruby / Rails better, but it can be useful then as well), is to have a look at Pry https://github.com/deivid-rodriguez/pry-byebug or for ruby 1.9.3 https://github.com/nixme/pry-debugger.

You will need maybe 1-2 hours to set it up and learn to use it, but after that you will get answer to questions like the above in a few seconds or minutes depending on the problem.

Cheers

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8En0x5zBszJnmCOUx%3Dmez5ZzfVWEs5d56wdHPT7%2BPgZWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 21 April 2017 at 00:30, fugee ohu <fugee279@gmail.com> wrote:
> In the snippet below,the last line causes the error; :showdate is
> whitelisted, it's components appear just in the params list returned by the
> browser The error's at the plus sign but not sure which of them
>
> @showday = params["showdate(3i)"]
> showmonth_string = params["showdate(2i)"]
> @showmonth = Date::MONTHNAMES[showmonth_string.to_i]
> @showyear = params["showdate(1i)"]
> @showdate = @showmonth + " " + @showday + ", " + @showyear

As I believe I have suggested to you before, first level simple
debugging can be done using logger.info, so in this case if you insert
before the last line something like

logger.info "Show date: #{@showmonth}, #{@showday}, #{@showyear}"

then you will see in the terminal what values those variables have.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsXGEt8F2-RyEmRbnVBw-LVATbFvtpkDNHUqLo69bRvzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, April 20, 2017

In the snippet below,the last line causes the error; :showdate is whitelisted, it's components appear just in the params list returned by the browser The error's at the plus sign but not sure which of them

    @showday = params["showdate(3i)"]
    showmonth_string = params["showdate(2i)"]
    @showmonth = Date::MONTHNAMES[showmonth_string.to_i]
    @showyear = params["showdate(1i)"]
    @showdate = @showmonth + " " + @showday + ", " + @showyear

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b0ab09c9-1484-439b-aa62-4e1b9cd384fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 20 April 2017 at 15:12, nynhex <nynhex@gmail.com> wrote:
> If they're columns in a table backed by a model, you would simply validate
> them on the model layer.

That is the correct answer to the question asked, but I suspect that
Fugee did not ask the question that he intended to ask.

Colin

>
> On Apr 20, 2017, at 9:06 AM, fugee ohu <fugee279@gmail.com> wrote:
>
> I'm putting some fields in my form that the controllers gonna use but
> they're columns in the table so I can't validate at the model level? How can
> I validate them?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/fc0a1365-571d-4d33-b518-12f40be8e6b9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/F0A0D811-16FC-4BFC-A6FC-9107A7D8459D%40gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuzODjYDc1%2BGrE%2BQnEcWJoHKL__v%3DN3U%2BYFMw0vcz2hwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

You can still add unpersistent attributes to your model and validate them like any other attribute on schema.

You should treat these params like any other param at controller and permit them.

Add this to your model

attr_accessor :some_attribute

So then you can do MyModel.new(some_attribute: 'foo')




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0532be8f-74e3-4597-8327-9d56eeb32d85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

You can also do something like this If i get it right,

resources :posts, param: :slug

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ffd0916e-d658-4cb9-b24f-c4b3ebb52454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

If they're columns in a table backed by a model, you would simply validate them on the model layer.


On Apr 20, 2017, at 9:06 AM, fugee ohu <fugee279@gmail.com> wrote:

I'm putting some fields in my form that the controllers gonna use but they're columns in the table so I can't validate at the model level? How can I validate them?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fc0a1365-571d-4d33-b518-12f40be8e6b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Thats great!

I am glad you shared this.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CANrYT%2BU7ORvezXs94RRiXYq7GS%3Ds1Wafbd-rLpdfQdVbdeAyKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I'm putting some fields in my form that the controllers gonna use but they're not columns in the table so I can't validate at the model level? How can I validate them?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b9267aef-206d-49de-8b2a-becebafccd80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I have to say that Rails is great. 5.1 introduces a wonderful feature for my need: direct http://edgeapi.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/CustomUrls.html#method-i-direct

Now in config/routes.rb I can write:

# Content model includes FriendlyId, so content_path(Content.first) calls record.to_param using the slug
resources :contents

direct 'edit_admin_content' do |record, options|
  # Here I specify to use the record id, so the resource url will fit better with admin section purposes
  options.merge controller: '/admin/contents', action: :edit, id: record.id
end

Same for actions :show, :update and :destroy. Problem solved!

Il giorno giovedì 20 aprile 2017 15:49:55 UTC+2, André Orvalho ha scritto:
I don't think it is an hack what you are doing.

To actually have routes receiving different types of ids you probably needed to change how those helpers are generated by rails.
That means you might have to monkey patch rails.

The alternative rails is giving you to be able to do this is by doing this: admin_content_path(id: content.id)

So it allows you to pass to override the id passed as argument.

I am sorry but I dont think there is a way around this.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2c64950f-5faa-458f-b0f5-2bfdd4017586%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I'm putting some fields in my form that the controllers gonna use but they're columns in the table so I can't validate at the model level? How can I validate them?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fc0a1365-571d-4d33-b518-12f40be8e6b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Thursday, April 20, 2017 at 8:05:00 AM UTC-4, Walter Lee Davis wrote:
utf8 and authenticity_token are at the "root" level of the params hash, at the same level as press_release. They are peers. Press release contains two child attributes and their values, because that's the way your form was set up. By default, when you use

        <%= form_for @foo do | f | %>

to start off your form, you are going to get a set of parameters like

        { ... "foo" => { "name" => "Bar", "style" => "Baz" } ... }

in return.

Walter

> On Apr 20, 2017, at 6:00 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> Here my params are nested utf8 wraps press_release which in turn wraps venue, venue_country, etc.
> What causes this behavior?
>
> {"utf8"=>"✓",
>  "authenticity_token"=>"qR82bEuyDUS6XD1dxylozc96nGH0kxk/ew+sUe95LT9s+8G9PJqAr06khj0bE9SEPElcinsWxe0Kgzppzq1g0w==",
>  "press_release"=>
>   {"venue"=>"",
>    "venue_country"=>"US",
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3538a0ba-4671-4fca-99b5-7d56583b39d8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Thanks 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/65e120b7-90c5-4472-9ef8-391a6e997e71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hello,

I've a team of ROR developers who are ready to engage in delivering.

We've experienced with different flavor of technologies other than ROR like python, java, perl, javascript, git, JSON, REST, SOAP, bash, RDBMS, linux commands and few others.

We've also rich experience of working in different domains in ROR development like telecom, inventory, ecommerce, payments/cards, etc.. 

Looking for the right opportunity to work out of remote location.

Thanks in advance!
sadathiru

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/24b542c8-2f10-4778-a244-9f1b64af3294%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I don't think it is an hack what you are doing.

To actually have routes receiving different types of ids you probably needed to change how those helpers are generated by rails.
That means you might have to monkey patch rails.

The alternative rails is giving you to be able to do this is by doing this: admin_content_path(id: content.id)

So it allows you to pass to override the id passed as argument.

I am sorry but I dont think there is a way around this.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a9b4b875-02c3-4460-a410-f22aede05fd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

utf8 and authenticity_token are at the "root" level of the params hash, at the same level as press_release. They are peers. Press release contains two child attributes and their values, because that's the way your form was set up. By default, when you use

<%= form_for @foo do | f | %>

to start off your form, you are going to get a set of parameters like

{ ... "foo" => { "name" => "Bar", "style" => "Baz" } ... }

in return.

Walter

> On Apr 20, 2017, at 6:00 AM, fugee ohu <fugee279@gmail.com> wrote:
>
> Here my params are nested utf8 wraps press_release which in turn wraps venue, venue_country, etc.
> What causes this behavior?
>
> {"utf8"=>"✓",
> "authenticity_token"=>"qR82bEuyDUS6XD1dxylozc96nGH0kxk/ew+sUe95LT9s+8G9PJqAr06khj0bE9SEPElcinsWxe0Kgzppzq1g0w==",
> "press_release"=>
> {"venue"=>"",
> "venue_country"=>"US",
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3538a0ba-4671-4fca-99b5-7d56583b39d8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/98CE44A0-21B1-44E2-BF7E-D1174C245A7A%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Here my params are nested utf8 wraps press_release which in turn wraps venue, venue_country, etc.
What causes this behavior?

{"utf8"=>"✓",   "authenticity_token"=>"qR82bEuyDUS6XD1dxylozc96nGH0kxk/ew+sUe95LT9s+8G9PJqAr06khj0bE9SEPElcinsWxe0Kgzppzq1g0w==",   "press_release"=>    {"venue"=>"",     "venue_country"=>"US",

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3538a0ba-4671-4fca-99b5-7d56583b39d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

The reason I want to do this is because there are some bugs like "circular dependencies" can't be found without eager load the entire app.
Since we only eager load at production, we can only notice this kind of issues on production. So I think it would be a good idea to eager load entire app during testing and we can fix it before it gets deployed.
And I just test this idea on my app and it ran normally on CI and my mac. But I'm not sure if there any drawback to do this, like significantly slow down the tests?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/76fe127b-c8c3-4a43-8b3c-d6517e808897%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, April 19, 2017

Hi,

I'm having some issues with the SchemaDumper in Rails 5.0.2 that's creating invalid schemas. I've outlined the issues in the gist below. Would love any feedback possible!

https://gist.github.com/dolphorama/9760138887e2df5c520a31646d3ebd54

Thanks!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c9fb7a80-fa14-4342-935d-878d9fb2b908%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, April 18, 2017

On Tuesday, April 18, 2017 at 9:34:49 PM UTC+1, João Bordalo wrote:
> Hi there,
>
>
> I'm trying to update a ruby on rails app from 4.2 to 5.0 version.
>
>
> I'm following this guide https://hashrocket.com/blog/posts/how-to-upgrade-to-rails-5 and when i run $ bundle update rails I have the following error:
>
> "
>
> Bundler could not find compatible versions for gem "activerecord":
>   In Gemfile:
>     audited-activerecord was resolved to 4.2.2, which depends on
>       activerecord (~> 4.0)
>
>
>     rails (< 5.1, >= 5.0.0.rc2) was resolved to 5.0.0.rc2, which depends on
>       activerecord (= 5.0.0.rc2)
>
>
> "
> I'm aware that it might appear some problems related to gems' dependencies, however I can't find out a solution to this problem, since . Can you help me?


This means that bundler couldn't find a version of the gem compatible with the version of rails you want. In this particular case, it looks like the gem changed name (and is just called audited now) and that recent versions of the gem are compatible with rails 5

Fred.

>
>
> Thank you in advance!
> João Bordalo

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3a31f0ca-075a-4eac-b256-d7af8ebb1654%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am looking for someone with about 3-5 years experience.  I have placed developers at this client before.  I have a direct relationship with the hiring manager (not going through HR). 


NO H1 OR THIRD PARTIES!!!!!!!!!!!!!!!!!

Required :

  • 3-5 years experience working in a highly-transactional production environment
  • Experience in web development using the Ruby on Rails web application framework
  • Proficient working with jQuery, HTML,Javascript,CSS, DOM
  • Strong relational database skills
  • Comfortable working from a linux shell
  • Version control systems (git preferred)
  • BDD with Cucumber/RSpec
  • Previous experience designing/interfacing to API's (REST, JSON, SOAP, etc.)
  • linux shell scripting (bash)
  • Works well in teams and consistently meets deadlines

Bonus experience but not required:

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/887f215f-f295-437d-ac51-a8e2a2465890%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi there,

I'm trying to update a ruby on rails app from 4.2 to 5.0 version.

I'm following this guide https://hashrocket.com/blog/posts/how-to-upgrade-to-rails-5 and when i run $ bundle update rails I have the following error:
"
Bundler could not find compatible versions for gem "activerecord":
  In Gemfile:
    audited-activerecord was resolved to 4.2.2, which depends on
      activerecord (~> 4.0)

    rails (< 5.1, >= 5.0.0.rc2) was resolved to 5.0.0.rc2, which depends on
      activerecord (= 5.0.0.rc2)

"
I'm aware that it might appear some problems related to gems' dependencies, however I can't find out a solution to this problem, since . Can you help me?

Thank you in advance!
João Bordalo

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a495c69b-caf3-4caa-895e-dbe255dab0ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Monday, April 17, 2017

I'm putting together a Ruby on Rails Security Checklist on GitHub. It is meant to be a community-driven resource, so I invite you to check it out and consider contributing.

Kind Regards,
Bruno Facca

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/186e900a-08bb-4e7c-84d5-fded67f12ddb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Friday, April 14, 2017

Hello, Folks! I need some advice. I need to create a web app and an android app, and for my project, I want to use Ruby on Rails as the backend but I need to use real-time communication between the client (android & web) and database, the way firebase does it. ActionCable could be used to provide the realtime feature but I'm not sure if it could be said about the android app as well as if I would be able to call the same Rails APIs calls from native android code with real-time updates.

So, am I better off using Firebase as a whole or is there a way to utilize such features with similar power in Rails. Any expert advice?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9c7968e4-e359-4af1-8efa-cf8efaf610d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Thanks.  This worked.

On Friday, April 14, 2017 at 12:59:08 PM UTC-4, nanaya wrote:
Hi,

On Sat, Apr 15, 2017, at 01:50, Joe Guerra wrote:
> ok, I've got it working but...
>
>  <%= Product.where( ['id =?', iu.product_id ]).pluck("title") %>
>
>
> *It's got [' '] around my title.*
>

Short fix is you probably want `Product.find(iu.product_id).title`.

[' '] you're seeing is caused by pluck returning an array and that's how
ruby turns array into string.

To be slightly more correct, you should add relation from iu's model to
product so you can use iu.product.title instead.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/247ad788-f541-44fd-a3e4-dbeb81cdfd96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On 14 Apr 2017 5:50 p.m., "Joe Guerra" <JGuerra@jginfosys.com> wrote:
ok, I've got it working but...

 <%= Product.where( ['id =?', iu.product_id ]).pluck("title") %>
Assuming that you have setup your relationships so that iu belongs_to product you can say

iu.product.title

Colin


On Friday, April 14, 2017 at 12:43:42 PM UTC-4, Joe Guerra wrote:
I need to return a product title from an id.   I've tried the following...

<%= Product.where( ['id =?', iu.product_id ]).select('title') %>

but it gives me a reference...

#<Product::ActiveRecord_Relation:0x007faca389eca0>

I've tried a number of things.

Any hints?

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e059f192-036d-4c83-86ea-1ecfc90453ee%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvEn5MXBDPq7ndT5J-yBgGg%3D_YSsPBXCgq1_Wro27vEww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi,

On Sat, Apr 15, 2017, at 01:50, Joe Guerra wrote:
> ok, I've got it working but...
>
> <%= Product.where( ['id =?', iu.product_id ]).pluck("title") %>
>
>
> *It's got [' '] around my title.*
>

Short fix is you probably want `Product.find(iu.product_id).title`.

[' '] you're seeing is caused by pluck returning an array and that's how
ruby turns array into string.

To be slightly more correct, you should add relation from iu's model to
product so you can use iu.product.title instead.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1492189114.2188825.944821736.05BEB15F%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

ok, I've got it working but...

 <%= Product.where( ['id =?', iu.product_id ]).pluck("title") %>

It's got [' '] around my title.



On Friday, April 14, 2017 at 12:43:42 PM UTC-4, Joe Guerra wrote:
I need to return a product title from an id.   I've tried the following...

<%= Product.where( ['id =?', iu.product_id ]).select('title') %>

but it gives me a reference...

#<Product::ActiveRecord_Relation:0x007faca389eca0>

I've tried a number of things.

Any hints?

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e059f192-036d-4c83-86ea-1ecfc90453ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I need to return a product title from an id.   I've tried the following...

<%= Product.where( ['id =?', iu.product_id ]).select('title') %>

but it gives me a reference...

#<Product::ActiveRecord_Relation:0x007faca389eca0>

I've tried a number of things.

Any hints?

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/69ccb5b2-416a-4771-a611-2fafce1753b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, April 13, 2017

how to add angular-js ng-model in rails input form ?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2807e010-7277-479f-a225-ee2529f708be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

You _could_ do this, but it's going to be a lot of trouble. Is there a reason why you don't want to add a pets table (and Pet model)? Then it would simply be a matter of adding a couple lines to your User model, and changing the users/_form partial to be a nested form.

class User < ApplicationModel
has_many :pets
accepts_nested_attributes_for :pets
...

class Pet < ApplicationModel
belongs_to :user
...

Walter

> On Apr 13, 2017, at 4:41 AM, fugee ohu <fugee279@gmail.com> wrote:
>
> Let's say I wanna let users add all their pet's on the same form but I don't know how many pets they have I need to let the user provide values for multiple attributes for each pet but won't be creating a pet's table Rather, on completion going to create a text list of the users pets How would I do this?
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ac4b98c8-12ee-4ba9-b643-cd759d8c40b8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4869DA79-07AB-4224-AEB1-27841C67C77B%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Let's say I wanna let users add all their pet's on the same form but I don't know how many pets they have I need to let the user provide values for multiple attributes for each pet but won't be creating a pet's table Rather, on completion going to create a text list of the users pets How would I do this?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ac4b98c8-12ee-4ba9-b643-cd759d8c40b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, April 12, 2017

Thanks a lot Nuno.

I think you are right! Also I would like to develop my mobile app with Ionic Framework which is based on Angular.Js so I am going for angular..
It is just so much popular and that brings so many advantages

Thanks
Bye
Fabrizio

Il giorno lunedì 10 aprile 2017 21:54:01 UTC+2, Nuno Silva ha scritto:
I don't understand why Ember is better

I think this "myth" was born because the main creator/contributor to Ember.js was on the core Rails team previously.
It only means that the philosophy behind the two frameworks (Rails and Ember) are similar.

AFAIK there's no other particular reason for Ember being better with Rails.
Rails tries to be, as much as it can, client-side independent.
 

On Monday, April 10, 2017 at 12:16:20 PM UTC-3, fabrizio bertoglio wrote:
Hello,

Sorry for the stupid question.
I am a solo Full-Stack-Developer, to save time I work with bootstrap layouts, which are very easy to find in Angular or only HTML. Working with ember.js, would mean, maybe in the future I would need to convert those html in Ember.js Apps.

Everybody says that Ember is the best with rails, but I learned a little bit of angular a while ago and also in the end Rails will just work as API with Angular and Ember, so I don't understand why Ember is better?

Also Angular is popular and I would save time as I already have done 2 weeks training on it.

This is the layout I am talking about, very ofter we can find Angular.js Layout for just 18 Euros, so it does not make any sense to invest hours of work in doing it...
I would use Angular or Ember mostly to deploy my app to mobile with Phonegap, but as my understanding I do not need Angular or Ember to deploy to Android/IOS with Phonegap...

https://wrapbootstrap.com/theme/pixeladmin-responsive-template-WB07403R9

Thanks a lot for your advice
Fabrizio Bertoglio

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f710752f-2c0c-4197-9661-0b77b7884c4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hello every one.
 want to learn the course please let me know if any one can help.


thanks
Naveen

On Wed, Apr 12, 2017 at 3:24 PM, Carlos Ferreira da Silva <carlinhus.fsilva@gmail.com> wrote:
Hi everyone, I've just released a GEM that allows you to use more advanced resources from PostgreSQL, like CTEs and the Enum type of column.
This is only the beginning, but I'd like to hear from you, any feedback, ideas or if you want to collaborate, please ping me on my email.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d68d0c9c-395a-4cdd-8df2-40a3ef4a14c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAEjDRMc7ew-vTZ2vaFHh5xgY-E55oYEBB6k0F%2B11ZKxRt6OjXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.