Ruby on Rails Wednesday, February 28, 2018



On Wednesday, February 28, 2018 at 7:02:00 PM UTC-5, Hassan Schroeder wrote:
On Wed, Feb 28, 2018 at 3:17 PM, fugee ohu <fuge...@gmail.com> wrote:
> I wanna let me bloggers create subscriber lists and send bulk emails so i
> wanna use a service like mailchimp but i don't wanna have to iterate through
> the users mailing lists to send each mail, rather i want my server to
> communicate with mailchimp once, giving it the list What type of mailchimp
> setup would that be, does it have a name?

Yes, it's called "MailChimp"  ๐Ÿ˜€

That's what MailChimp is about -- you create your subscriber list
*on their system* and tell MC to initiate bulk email sendings via
their API.

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

Thanks Hassan I actually get a bad feeling about  sharing all those email addresses with mailchimp Maybe it would be better to setup a new domain and vps mail server dedicated to my site's blog user's mailing lists, this way if the server gets blacklisted I can just create a new one If users invite subscribers and then send them bulk email it's not necessarily a gateway for spammers How would a spammer take advantage of something like that and why would they bother 

--
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/29facf35-0fd0-4612-8471-82c18711e270%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, Feb 28, 2018 at 3:17 PM, fugee ohu <fugee279@gmail.com> wrote:
> I wanna let me bloggers create subscriber lists and send bulk emails so i
> wanna use a service like mailchimp but i don't wanna have to iterate through
> the users mailing lists to send each mail, rather i want my server to
> communicate with mailchimp once, giving it the list What type of mailchimp
> setup would that be, does it have a name?

Yes, it's called "MailChimp" ๐Ÿ˜€

That's what MailChimp is about -- you create your subscriber list
*on their system* and tell MC to initiate bulk email sendings via
their API.

--
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/CACmC4yBpG6tudA%3DjXpmLc5q6sAnASdNvX_dAn93ZhrKwtzQAyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I wanna let me bloggers create subscriber lists and send bulk emails so i wanna use a service like mailchimp but i don't wanna have to iterate through the users mailing lists to send each mail, rather i want my server to communicate with mailchimp once, giving it the list What type of mailchimp setup would that be, does it have a name?

--
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/7bf2c17f-0012-403d-8735-8861a4ea0855%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I wanna use a service like mailchimp to let me users send emails to their subscribers but 

--
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/59a55b1c-f953-477c-98e1-ddd70adac6fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

hey folks, any senior fullstack (ruby, angular) developer looking for a perm position in London? (no virtual ceiling on salary - more than flexible for the right people), relocation and visa ok). would tell more about the product but in stealth so can't say much here. but email me if interested

--
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/23d11487-c2ea-4c38-ba1f-a0404a57be12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, Feb 28, 2018 at 9:30 AM, Daynthan Kabilan <dayanthan86@gmail.com> wrote:

> The ExLynx documentaion based on webservices code, but i have created XML
> files with user data.

Why "create files" if there's no documented upload function? That
makes no sense.

Just use their API to upload the data directly.

--
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/CACmC4yBdBfxhfg%2BKQvB5FEcyJR0Ge8Hhwaad9oxdcQQqTdYWoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

yes, this file upload process in running application only not in command line.

FYI, This process should be work with a click event.

The ExLynx documentaion based on webservices code, but i have created XML files with user data.

On Wed, Feb 28, 2018 at 9:54 PM, Hassan Schroeder <hassan.schroeder@gmail.com> wrote:
On Wed, Feb 28, 2018 at 8:15 AM, Daynthan Kabilan <dayanthan86@gmail.com> wrote:

> Currently, i need help for how to make the upload process with third party
> site(EzLynx).

Are you trying to do this file upload from within a running application
or from the command line or what?

Does the ExLynx API not document how it accepts data?

--
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/CACmC4yDxst5mzApO%3DZpR4EzbCWhPitqvcGuw3bZxo5en0T7tGg%40mail.gmail.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/CADKeJyRPDXXWF_ug7RvKSY2TpQso7toanZy6%2BV6prs73hUT20g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am trying to create an item with nested attributes, these are my tables:

Item

  has_many :items_modifier_groups, dependent: :destroy    has_many :items_modifier_group_items, dependent: :destroy      attr_accessible :items_modifier_groups_attributes, :items_modifier_group_items_attributes    accepts_nested_attributes_for :items_modifier_groups, :items_modifier_group_items

ModifierGroup

  attr_accessible: tag_id

ItemsModifierGroup

  belongs_to :modifier_group    belongs_to :item    has_many :items_modifier_group_items, dependent: :destroy      attr_accessible :item_id, :modifier_group_id, :modifier_group_attributes, :items_modifier_group_items_attributes    accepts_nested_attributes_for :modifier_group, :items_modifier_group_items

ItemsModifierGroupItem - Table4

  belongs_to :items_modifier_group    belongs_to :item      attr_accessible :items_modifier_group_id, :item_id, :pre_select

Params to create from console:


c = Item.new(    "name" => "test1", "items_modifier_groups_attributes"=> {       "0"=> {         "items_modifier_group_items_attributes"=> {          "0"=> {            "pre_select"=>"true"          }        },         "min_item"=>"1",         "modifier_group_attributes"=> {           "tag_id"=> "5"         }      }    }  )    c.save    INSERT INTO "items_modifier_group_items" ("created_at", "item_id", "items_modifier_group_id", "pre_select", "sequence_no", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"  [["created_at", Wed, 28 Feb 2018 15:44:27 GST +04:00], ["item_id", nil], ["items_modifier_group_id", 35], ["pre_select", true], ["sequence_no", 0], ["updated_at", Wed, 28 Feb 2018 15:44:27 GST +04:00]


When it creates an item, the item_id is nil in ItemsModifierGroupItem table; however, item_id is created in ItemsModifierGroup table.

Am I missing anything in the params?

--
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/77f50f74-b43e-4ea1-910c-2d97c0f94db5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, Feb 28, 2018 at 8:15 AM, Daynthan Kabilan <dayanthan86@gmail.com> wrote:

> Currently, i need help for how to make the upload process with third party
> site(EzLynx).

Are you trying to do this file upload from within a running application
or from the command line or what?

Does the ExLynx API not document how it accepts data?

--
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/CACmC4yDxst5mzApO%3DZpR4EzbCWhPitqvcGuw3bZxo5en0T7tGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Thanks for your reply,

I am working with a insurance project. Here i need one requirement,

Admin should fetched all user details from Rails application and store into third party site(EzLynx).

So, I have created a XML file with each user details it should be store in EzLynx.

Currently, i need help for how to make the upload process with third party site(EzLynx).

On Wed, Feb 28, 2018 at 8:59 PM, Joe Guerra <JGuerra@jginfosys.com> wrote:
do they have an API?


On Wednesday, February 28, 2018 at 8:59:17 AM UTC-5, daynthan kabilan wrote:
Hi All,

I need to fetch the data form rails application and store each data to one third party tool(EZLynx) API. Anyone can help me.

Thanks for advance
Daya

--
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/81f7e600-2fbb-4edd-a5bb-f63ca32ce735%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/CADKeJyRcEmijzLeZUxzFeA5L9U6%2BEYyA9ToexxCXec-BN%2Br%3DpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

do they have an API?

On Wednesday, February 28, 2018 at 8:59:17 AM UTC-5, daynthan kabilan wrote:
Hi All,

I need to fetch the data form rails application and store each data to one third party tool(EZLynx) API. Anyone can help me.

Thanks for advance
Daya

--
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/81f7e600-2fbb-4edd-a5bb-f63ca32ce735%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

And how would you know if that's their real name? 

On Wednesday, February 28, 2018 at 9:22:30 AM UTC-5, fugee ohu wrote:
I have a social networking site, in development but in production I have some users registered with fake names like just initials for first and last name Should I permit it or try to enforce that users can only use their real names?

--
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/27d26c94-6b91-44e5-8499-1736debb8203%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, Feb 28, 2018 at 5:58 AM, Daynthan Kabilan <dayanthan86@gmail.com> wrote:

> I need to fetch the data form rails application and store each data to one
> third party tool(EZLynx) API.

What exactly are you having trouble with?

--
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/CACmC4yAKpyvRkaAxfvwo2cBQ7v%3Dh-a2PTpf3z%3D0%3D9N%2B2KdKyOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 28 February 2018 at 14:22, fugee ohu <fugee279@gmail.com> wrote:
> I have a social networking site, in development but in production I have
> some users registered with fake names like just initials for first and last
> name Should I permit it or try to enforce that users can only use their real
> names?

That is up to you, it is not a rails issue.

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%3D0gLv6Wpkc-ujgYRkmytOpWYuPD9z_9Y-Zc2ZF4okhGukX4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I have a social networking site, in development but in production I have some users registered with fake names like just initials for first and last name Should I permit it or try to enforce that users can only use their real names?

--
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/5e7f1e29-4f82-4c5d-baab-82b7dabc14f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi All,

I need to fetch the data form rails application and store each data to one third party tool(EZLynx) API. Anyone can help me.

Thanks for advance
Daya

--
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/CADKeJyTXG1uC0VXz0GZTvvwoy1MKVpPXcAZdLA6AGoevkEA3bA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, February 27, 2018

The first value in the month_names array is nill so my translations which don't begin with nill, but rather January for :en, so what ends up happenning is the month with the value 2 gets represented as March instead of February in translations

--
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/b8966a96-943f-4b0a-ba01-7a642c1d3a85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hey all,

Has anyone had any luck creating fixtures for Active Storage uploads? I wouldn't mind creating uploads in integration tests, but because my User model has_one_attached :avatar and it always has to be present, all my integration tests fail due to non-existent user avatar in my header (.variant() called on nil).

Cheers

Ruby on Rails

oh, I figured this out.  I needed to use <%= image_tag @users.avatar %>


I've scrapped the project anyways.  

Thanks,
Joe

On Tuesday, February 27, 2018 at 11:04:47 AM UTC-5, Walter Lee Davis wrote:
Can you say a little more about which uploader you are using? Is it Paperclip, CarrierWave, Shrine...

They each have their own way to do this. To answer your larger question, the method image_url is being injected into your object from the uploader gem, and it should respond with the calculated URL of the image, to match how you configured that uploader.

Walter

> On Feb 25, 2018, at 7:10 PM, Joe Guerra <jgu...@jginfosys.com> wrote:
>
> Hi, I've got 2 uploaders in my app.  They are both uploading to aws s3 no problems.
>
> I'm able to display my photos on my show page using, but having no luck with my avatar.
>
> <%= image_tag @photo.image_url(:thumb).to_s %>
>
> <%= image_tag @user.image_url(:thumb).to_s %>
>
>
> I don't even know where .image_url comes from? It's not saved in the table and not in either of the models or controllers.
>
> Any clues?
>
>
>
> --
> 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/1caa52a8-34e2-48d9-86a5-f955a8b63573%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/bcfb079a-afe4-4d35-be8a-a26e6fb441ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Can you say a little more about which uploader you are using? Is it Paperclip, CarrierWave, Shrine...

They each have their own way to do this. To answer your larger question, the method image_url is being injected into your object from the uploader gem, and it should respond with the calculated URL of the image, to match how you configured that uploader.

Walter

> On Feb 25, 2018, at 7:10 PM, Joe Guerra <jguerra@jginfosys.com> wrote:
>
> Hi, I've got 2 uploaders in my app. They are both uploading to aws s3 no problems.
>
> I'm able to display my photos on my show page using, but having no luck with my avatar.
>
> <%= image_tag @photo.image_url(:thumb).to_s %>
>
> <%= image_tag @user.image_url(:thumb).to_s %>
>
>
> I don't even know where .image_url comes from? It's not saved in the table and not in either of the models or controllers.
>
> Any clues?
>
>
>
> --
> 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/1caa52a8-34e2-48d9-86a5-f955a8b63573%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/C54ACC13-5E43-4F22-89CA-90A4DEE4511B%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Anyone can help me figure out why the blogit gem dates posts a month ahead of today?

--
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/20298f15-5239-466a-a42e-e50e2188bb7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Ok, the official speaker list for RubyHACK is on the website! (sorry it's taken so long - lots of work involved in this.)

Please check us out and get registered. Early Bird discounts ending soon! (like in 2 days!)

we are still looking for sponsors!

http://rubyhack.com

--
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/9D1B0AD6-CC78-45B7-8EDA-602CAFEBADA3%40xmission.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Monday, February 26, 2018

Hi,
Please check my gem: https://github.com/igorkasyanchuk/log_analyzer/ to check performance of your views/partials from log.
Look forward for a feedback.
Thanks
Igor

--
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/dbb2f27f-78e7-487c-9e43-a9c223e6ec23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Currently I have in my app I have cron tasks running that gather information and broadcasts it to the subscribers on the channels. On these taks I do view rendering before I broadcast the message to the client. But due to being a background cron task there is no user requesting the updated information and there might be no user listening to this broadcast and rendering is useless.
Therefore I'm looking (but could not find it in the documentation) if there is a way to check if there are clients listening on this channel/stream? It could save a lot of cpu. Now I send a very small message out and check the return value not 0 (means consumers are listening) but it should be more simple.
I could write code to track in the database if there are clients connected/disconnected on certain streams but the app already knows this (I assume?).

--
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/f3554873-f236-4a97-9e59-e8697e7d8bfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Check out my Ruby on Rails tutorial at https://github.com/jhsu802701/tutorial-rails-rubymn2 .  It was inspired by Michael Hartl's Rails Tutorial and chronicles the process I used for building a new Rails site for Ruby Users of Minnesota.

Like Rails Tutorial, my tutorial features test-driven development.  Unlike Rails Tutorial, my tutorial features short chapters to ensure that you don't get lost.

Let me know what you think.  If you find bugs, please submit issues to the tutorial source code.

--
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/cbf27eb7-52f7-467f-ac8e-221bd69c0b1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Tue, Feb 27, 2018 at 1:32 PM, fugee ohu <fugee279@gmail.com> wrote:
I mounted an engine and it has it's own assets pipeline How do I override or add to it? It's in a subdirectory under the gem root path /app/assets/stylesheets/blogit There's no application.css file in the folder, only other css files I created an application.html.erb file for the blog portion of the site so the file i need to add to the assets pipleline is application.css

CSS is loaded by order.  A more recently loaded stylesheet will override a stylesheet loaded earlier.

= stylesheet_link_tag 'application'
= stylesheet_link_tag 'custom' 

so in the code above, anything inside custom.css will take precedence over those in application

--
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/a5aea9c5-f84c-469e-a6cc-cd287bce4e8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-------------------------------------------------------------
visit my blog at http://jimlabs.herokuapp.com

--
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/CAJ8y7VdcShJ9jkhNyyvTKd8WOyf0AbWBY8C%3DfsLiGAHt2sKjNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I mounted an engine and it has it's own assets pipeline How do I override or add to it? It's in a subdirectory under the gem root path /app/assets/stylesheets/blogit There's no application.css file in the folder, only other css files I created an application.html.erb file for the blog portion of the site so the file i need to add to the assets pipleline is application.css

--
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/a5aea9c5-f84c-469e-a6cc-cd287bce4e8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 21 February 2018 at 19:35, Abdel Latif <mlotfi2005@gmail.com> wrote:
> Hi,
>
> I would like to find a way to tell me if an array has only some items but
> not others, for example :
>
> employment_status = ['Hired','Hired','Provisionally
> Hired','Hired','Hired','Provisionally Hired','Hired','Provisionally
> Hired','Hired']
>
> I want to test this array to see if it contains only :
> Hired
> or
> Provisionally Hired
> or both

Array.include? might be what you are looking for.

Colin

>
> but not any other string.
>
> Thanks,
> your help is appreciated.
>
>
>
> --
> 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/3e342669-ada4-4b38-b47a-56ff58912e6d%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%3D0gLsBytQnifRi_Q9rpN5QYvjwUOgKKsK7E6sjvn-0%2Bnh0hQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

There are a few ways you could do this, but if you already have the array you want to check, and an array of values that you are looking for, you could do something like this:

employment_status = ['Hired','Hired','Provisionally Hired','Hired','Hired','Provisionally Hired','Hired','Provisionally Hired','Hired']

if (employment_status - ['Hired', 'Provisionally Hired']).empty?
 
# ...
end

That removes the values you are looking for from the original array, and if it's empty, means that the array was comprised entirely of those values.

Jim

On Monday, February 26, 2018 at 6:29:06 AM UTC-5, Abdel Latif wrote:
Hi,

I would like to find a way to tell me if an array has only some items but not others, for example :

employment_status = ['Hired','Hired','Provisionally Hired','Hired','Hired','Provisionally Hired','Hired','Provisionally Hired','Hired']

I want to test this array to see if it contains only :
Hired
or
Provisionally Hired
or both

but not any other string.

Thanks,
your help is appreciated.



--
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/d5d120a1-b694-475e-acc3-cc55c824605e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, February 25, 2018

Hi, I've got 2 uploaders in my app.  They are both uploading to aws s3 no problems.

I'm able to display my photos on my show page using, but having no luck with my avatar.

<%= image_tag @photo.image_url(:thumb).to_s %>

<%= image_tag @user.image_url(:thumb).to_s %>


I don't even know where .image_url comes from? It's not saved in the table and not in either of the models or controllers.

Any clues?


--
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/1caa52a8-34e2-48d9-86a5-f955a8b63573%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Sunday, 25 February 2018 18:18:37 UTC, Mauro Locatelli wrote:
Ok I understand, sorry but I never need a thing such these so I can't help you.

Mauro



Yes ok you couldn't help with that but I found the answer eventually, I mentioned it in my post, so it's ok. 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/3d9220a2-b657-4b0b-a173-6a6aa5dc7f14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Sun, Feb 25, 2018 at 10:14 AM, Robert Phillips
<robert.phillips37@gmail.com> wrote:

> C:\blah>type a.erb
> <%= 5 %>
> C:\blah>erb a.erb
> 5
> C:\blah>

Well, you learn something every day ๐Ÿ˜€

In 10 years of developing Rails apps I've never had a use case that
required that, but good to know...

--
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/CACmC4yBmJ0xZHCPHSQRgn9h42XXfb0JnZ5hJrZMnukSf_UAQtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Ok I understand, sorry but I never need a thing such these so I can't help you.

Mauro

Il 25 feb 2018 7:14 PM, "Robert Phillips" <robert.phillips37@gmail.com> ha scritto:
No not the rails console!

ERB stands for Embedded Ruby!

You know when you do rails generate controller abc def

you get a file  def.html.erb

that's an ERB file, an Embedded Ruby file

The contents of that file get preprocessed , such that anything outside of <%..%>  gets outputted, and anything inside <%...%> gets executed and <%=....%> involves execution and a result outputted.

PHP has a similar concept.. PHP though also has a PHP.EXE file that you can run a file through and get the output.

I see it now, it's mentioned here 



C:\Ruby24-x64\bin>dir erb.* /s/b
C:\Ruby24-x64\bin\erb
C:\Ruby24-x64\bin\erb.cmd

C:\Ruby24-x64\bin>


C:\blah>type a.erb
<%= 5 %>
C:\blah>erb a.erb
5
C:\blah>




On Sunday, 25 February 2018 17:49:07 UTC, Mauro Locatelli wrote:
rails console?

Il 25 feb 2018 6:46 PM, "Robert Phillips" <robert.p...@gmail.com> ha scritto:


On Sunday, 25 February 2018 17:29:36 UTC, Hassan Schroeder wrote:
On Sun, Feb 25, 2018 at 9:08 AM, Robert Phillips
<robert.p...@gmail.com> wrote:

> Is there a command line ERB?

I suspect you're looking for "irb" -- Interactive Ruby.

No, ERB is not IRB.  ERB is called Embedded Ruby,  people often use it when they use Rails.

 

--
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/048722b9-806b-4f4c-8443-c5de43785a59%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/55a7aacd-79e0-41d1-beaf-8725f1e7d3ce%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/CANnJYrpjYwEHZHgUJYBr_D%2BQtV-GRytG--52F%3DKZbMEmQNBbsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

No not the rails console!

ERB stands for Embedded Ruby!

You know when you do rails generate controller abc def

you get a file  def.html.erb

that's an ERB file, an Embedded Ruby file

The contents of that file get preprocessed , such that anything outside of <%..%>  gets outputted, and anything inside <%...%> gets executed and <%=....%> involves execution and a result outputted.

PHP has a similar concept.. PHP though also has a PHP.EXE file that you can run a file through and get the output.

I see it now, it's mentioned here 

https://stackoverflow.com/questions/980547/how-do-i-execute-ruby-template-files-erb-without-a-web-server-from-command-lin


C:\Ruby24-x64\bin>dir erb.* /s/b
C:\Ruby24-x64\bin\erb
C:\Ruby24-x64\bin\erb.cmd

C:\Ruby24-x64\bin>


C:\blah>type a.erb
<%= 5 %>
C:\blah>erb a.erb
5
C:\blah>




On Sunday, 25 February 2018 17:49:07 UTC, Mauro Locatelli wrote:
rails console?

Il 25 feb 2018 6:46 PM, "Robert Phillips" <robert.p...@gmail.com> ha scritto:


On Sunday, 25 February 2018 17:29:36 UTC, Hassan Schroeder wrote:
On Sun, Feb 25, 2018 at 9:08 AM, Robert Phillips
<robert.p...@gmail.com> wrote:

> Is there a command line ERB?

I suspect you're looking for "irb" -- Interactive Ruby.

No, ERB is not IRB.  ERB is called Embedded Ruby,  people often use it when they use Rails.

 

--
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/048722b9-806b-4f4c-8443-c5de43785a59%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/55a7aacd-79e0-41d1-beaf-8725f1e7d3ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Sun, Feb 25, 2018 at 9:46 AM, Robert Phillips
<robert.phillips37@gmail.com> wrote:

> No, ERB is not IRB. ERB is called Embedded Ruby, people often use it when
> they use Rails.

So what would a "command line ERB" do exactly?

--
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/CACmC4yBQxEQbBJw5%3Dd0dsX-T6nWYohK1UNQER8sUCuNBa55wkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

rails console?

Il 25 feb 2018 6:46 PM, "Robert Phillips" <robert.phillips37@gmail.com> ha scritto:


On Sunday, 25 February 2018 17:29:36 UTC, Hassan Schroeder wrote:
On Sun, Feb 25, 2018 at 9:08 AM, Robert Phillips
<robert.p...@gmail.com> wrote:

> Is there a command line ERB?

I suspect you're looking for "irb" -- Interactive Ruby.

No, ERB is not IRB.  ERB is called Embedded Ruby,  people often use it when they use Rails.

 

--
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/048722b9-806b-4f4c-8443-c5de43785a59%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/CANnJYrrp-kzcxtK8d9OYXbXHx4cX_3FxLCKZHw-8qYWLOYVxmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Sunday, 25 February 2018 17:29:36 UTC, Hassan Schroeder wrote:
On Sun, Feb 25, 2018 at 9:08 AM, Robert Phillips
<robert.p...@gmail.com> wrote:

> Is there a command line ERB?

I suspect you're looking for "irb" -- Interactive Ruby.

No, ERB is not IRB.  ERB is called Embedded Ruby,  people often use it when they use Rails.

 

--
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/048722b9-806b-4f4c-8443-c5de43785a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Sun, Feb 25, 2018 at 9:08 AM, Robert Phillips
<robert.phillips37@gmail.com> wrote:

> Is there a command line ERB?

I suspect you're looking for "irb" -- Interactive Ruby.

> I am in windows, I don't know if there is one in linux but not in windows?
> if perhaps the issue is different distros of ruby , I don't know which
> distro I have / how to find out.

I can't help with the windows part, but how did you install Ruby?
Where is the ruby executable? I would think there would be an "irb"
executable in the same directory.

Also, `ruby --version` should tell you what you have installed.

HTH!
--
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/CACmC4yB7uYSSRBz6WcxGWn43ydt3DjnpSzYZm4%3D26ZReV%2BQG7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi

Is there a command line ERB? 

I've heard of one but if I look for an ERB executable I can't see one

I am in windows, I don't know if there is one in linux but not in windows?  if perhaps the issue is different distros of ruby , I don't know which distro I have / how to find out.

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/9fa63082-b644-4fc3-b3e2-b389d370e203%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.