Ruby on Rails Thursday, November 30, 2017

I think the most natural way read the code created_at < 10.minutes.ago is "created_at is less than ten minutes ago," but that reading suggests the mistaken interpretation that created_at is fewer than ten minutes ago. The correct interpretation is that created_at is earlier than ten minutes ago. Is there a better way to write the same comparison?

I've thought of three potential improvements so far:
  • 10.minutes.ago > created_at  This "Yoda condition" style doesn't have a translation into ordinary English that tempts you into misunderstanding. But Yoda conditions are inconsistent with the rest of the comparisons in my codebase.
  • Time.now > 10.minutes.after(created_at)  This is another style of Yoda condition. This one allows people who misread the operator (as "more than ten minutes after created_at" instead of "later than ten minutes after created_at") to correctly predict the actual behavior, but for the wrong reason.
  • created_at.earlier_than?(10.minutes.ago)  The ordinary English translation (created_at is earlier than ten minutes ago) is correct. But this requires monkeypatching DateTime (or using the human_time gem) to add the earlier_than? method, which I'd prefer not to do.
Is there a better way that avoids Yoda conditionals, monkeypatching and extra gems?

Thanks for the consideration,
Nate

--
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/b8058e08-6513-4979-b171-3721035464ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I have a Thing object that can be presented in two ways depending on whether you are in the main controller or the list controller.

main/_thing.rb
list/_thing.rb

I can cache both of these without them clobbering each others' keys

main/_thing.rb
<% cache ["main",thing] do %>
-stuff-
<% end %>

and

list/_thing.rb
<% cache ["list",thing] do %>
-stuff-
<% end %>


Rails 5 has the shiny new cache capability for collections

<%= render partial: "main/thing", collection: myThings, cached: true  %>

this works great

however I'd also like to the same approach in my list view with

<%= render partial: "list/thing", collection: myThings, cached: true  %>

but now I have conflicting keys and everything goes squirly. I think because the cache key is generated on Thing and doesn't 'realise' that I'm using different presentation logic.
there is one hint of an error I get

'Couldn't find template for digesting: list/_thing'
I don't understand this error; list/_thing.html.erb definitely does exist.


I can't for the life of me figure out how to get a custom cache key (and for a while I accidentally broke production before realising the issue here).

The relevant rails code is here I think
https://github.com/rails/rails/blob/cf5bc0dd5359e61dcb93e719279c7198e68a0eb8/actionview/lib/action_view/helpers/cache_helper.rb

and it looks like this should be possible.

I have tried

cached: -> myThings { [ myThings, "list" ] }
and
cached: [myThings, "list" ] 

but those were really just guesses as I don't understand the logic

I'm running rails 5.0.6

can anyone help?

thank you.

Rob



--
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/f8c54f86-080c-4c5c-b21d-f2eb3f622d5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, November 29, 2017

I wrote an article http://lulalala.logdown.com/posts/3766261-rails-decorator-presenter analyzing 6 different presenter/decorator gems.
There are so many of these gems.
What they differ are the amount of magic they add to make their interfaces less explicit.

--
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/a678ea1a-133b-44a7-a1be-28f23df1d12f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Have a look at zabbix.

--
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/34b8fab2-8046-4cac-880d-9b6fe163449f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, November 28, 2017

http://rvm.io/
You could use
curl -sSL https://get.rvm.io | bash -s stable

--
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/1c41780d-2efb-49b8-a7e2-4a862623b7c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I need to install `rvm` on a new machine.
I would use `rvm` to switch to different ruby versions and gemsets required by different Ruby on Rails applications.

When a couple of years ago I installed rvm on my current Ubuntu machine, I did it with the following command:

$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable


I notice now that rvm suggests to Ubuntu users to install rvm using the dedicated Ubuntu package.
However the documentation at RailsApp, where I initially found the advice of installing rvm, does not consider this option but instead uses the above curl command, as if it were considered a better choice. I wonder which one of the two options is preferable, and why.

Also in 2015 there was documentation like the above one that suggested to use the curl command with the --rails option instead of the --ruby option.
This suggestion was removed in the RailsApp documentation, and the --ruby option has instead taken its place.
I could not find much information on these options. What I understand is that they install respectively the last stable rails gem and the last stable ruby. If this is all they do, I suppose they are optional indeed, since Ruby can be installed later, and every Rails application has its own rails version in the Gemfile.

--
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/2c90cfc6-66f4-4864-bbce-bdae09a18fc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am currently using NewRelic for a Rails production project, around 5 EC2 servers, and the pricing for a non-free account is extremely bad (personal opinion) while of course the free account is no good since the data only sticks around for 1 day.

Does anyone have any experience with any alternatives to NewRelic that they used in a production environment successfully?

After doing research on the topic I found many alternatives and a strong contender, but I would like to get some opinions for someone that I know for sure (hopefully) used the service themselves.

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

Ruby on Rails Monday, November 27, 2017

Hi !

 

Since you are in this group - I figure that you are a Ruby enthusiast. We are looking to hire Ruby Engineers. Please send me your resume at  recuritment@udmglobal.com if you are interested.

 

Role: Full Stack Developer

Experience  : 1-6 years

Openings : 5

Job Location : Bangalore 

Education : No constraints 

Responsibilities

Design, build, and maintain efficient, reusable, and reliable code

Design robust, scalable and secure features

Identify bottlenecks and bugs, and devise solutions to these problems

Communicate and collaborate with other Developers and QA Engineers to ensure smooth operations in product development.

Contribute in all phases of the development lifecycle

Drive continuous adoption and integration of relevant new technologies into design

Skills / Requirements

Ruby / Ruby On Rails framework

HTML5 / CSS3 / Bootstrap

Javascript / JQuery

Any Javascript framework like Backbone, Angular JS

Postgres / MySQL

Good understanding of server-side CSS preprocessors such as Sass, Less

Proven work experience in software development

Experience developing highly interactive applications

A firm grasp of object oriented analysis and design

Passion for writing great, simple, clean, efficient code

Good knowledge of relational databases

Familiarity with concepts of MVC, Mocking, ORM, and RESTful

Understanding of fundamental design principles behind a scalable application

Able to implement automated testing platforms and unit tests

Proficient understanding of code versioning tools like Git

Nice to have the experience of hosting / deploying to AWS

 

Job Advantage

Work on latest technologies in ROR and micro frameworks

Opportunities to learn and work on advance concepts like Single Page Application, Micro-service architecture, APIs, event driven systems etc

Opportunities to solve real business and technical problems.

Freedom to express and implement technical ideas and business requirement

Recognition of good work

Flexible and fun work environment

Salary

--
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/bf2eff4d-77e2-4b53-92d1-601c32a4d53c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, November 26, 2017

Actualy you missed the main thisg, not saying whitch version of rails I was using.  I was using old syntax for 9I think 2.3) and was using rails 5.

On Tuesday, November 21, 2017 at 2:04:27 AM UTC, Hassan Schroeder wrote:
On Mon, Nov 20, 2017 at 4:46 PM, Ben Edwards <lo...@funkytwig.com> wrote:

> What am I doing wrong?

In order:

1. not having a test for the method in the first place
2. not showing us the complete code for that method
3. not showing us the full log entry and stack trace

😀
--
Hassan Schroeder ------------------------ hassan.s...@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/d16c06ba-2a46-4956-b7a1-908e24e4e5fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I have an old HTC m9 with a slightly busted screen and I want to use it as a rails test server.  I installed GNURoot Debian which gave me an almost full Linux system running within Android but it does not support users, everything is run as root.    So was wondering if it was OK to run rails as root and if not has anybody got any advice about a better way to install Linux/rails on an n Android phone?

--
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/97f9a67b-d5e7-4db0-998f-44a2f290625c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Friday, November 24, 2017

Hi Philip,

Should certainly fit your use case.  Have a play about and see how it goes.

If you need any help at all feel free to raise an issue on the github repo or reach out to me directly.

Cheers,

Ed

On Fri, Nov 24, 2017 at 12:06 AM, Philip Rhoades <phil@pricom.com.au> wrote:
Chatty,


On 2017-11-24 07:20, Chatty Maps wrote:
Hello Kishore,

I have an open source project that I could do with some help on. Have
a look:

https://github.com/etewiah/property_web_builder

If you are intersted, let me know and I can guide your through some of
the things that need to be done.


I am hardly a Rails expert but I am interested in this app - it could be useful for me to use to sell building lots in my "Life Extension village" here:

  http://lev.com.au

I will play around with the app and see how I go!

Thanks!

Phil.


Cheers,

Ed

On Sunday, November 12, 2017 at 8:52:23 AM UTC, Kishore Srinivas
wrote:

I just finished the official Rails 5 blog app , and now  am looking
for a good open source (rails 5) to learn more and be
comfortable,which one would you highly recommend to pick up the pace
? Thank you !

 --
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/8074bdde-503b-43b8-91e8-6d0507604dd3%40googlegroups.com
[1].
For more options, visit https://groups.google.com/d/optout.


Links:
------
[1]
https://groups.google.com/d/msgid/rubyonrails-talk/8074bdde-503b-43b8-91e8-6d0507604dd3%40googlegroups.com?utm_medium=email&utm_source=footer

--
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  phil@pricom.com.au

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

Ruby on Rails

Hello Chatty, I had a look at the project and it looks fun.

Can you tell me what kind of help do you need with the project?

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

Ruby on Rails Thursday, November 23, 2017

Chatty,


On 2017-11-24 07:20, Chatty Maps wrote:
> Hello Kishore,
>
> I have an open source project that I could do with some help on. Have
> a look:
>
> https://github.com/etewiah/property_web_builder
>
> If you are intersted, let me know and I can guide your through some of
> the things that need to be done.


I am hardly a Rails expert but I am interested in this app - it could be
useful for me to use to sell building lots in my "Life Extension
village" here:

http://lev.com.au

I will play around with the app and see how I go!

Thanks!

Phil.


> Cheers,
>
> Ed
>
> On Sunday, November 12, 2017 at 8:52:23 AM UTC, Kishore Srinivas
> wrote:
>
>> I just finished the official Rails 5 blog app , and now am looking
>> for a good open source (rails 5) to learn more and be
>> comfortable,which one would you highly recommend to pick up the pace
>> ? Thank you !
>
> --
> 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/8074bdde-503b-43b8-91e8-6d0507604dd3%40googlegroups.com
> [1].
> For more options, visit https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/rubyonrails-talk/8074bdde-503b-43b8-91e8-6d0507604dd3%40googlegroups.com?utm_medium=email&utm_source=footer

--
Philip Rhoades

PO Box 896
Cowra NSW 2794
Australia
E-mail: phil@pricom.com.au

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

Ruby on Rails

Hello Kishore,

I have an open source project that I could do with some help on. Have a look:

https://github.com/etewiah/property_web_builder

If you are intersted, let me know and I can guide your through some of the things that need to be done.

Cheers,

Ed



On Sunday, November 12, 2017 at 8:52:23 AM UTC, Kishore Srinivas wrote:
I just finished the official Rails 5 blog app , and now  am looking for a good open source (rails 5) to learn more and be comfortable,which one would you highly recommend to pick up the pace ? Thank you !

--
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/8074bdde-503b-43b8-91e8-6d0507604dd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, November 22, 2017

Hi there! 

Because of fast growth we are hiring new colleagues for our Ruby team. 

In short, our company FUGA (located in Amsterdam, founded in 2006) is a blend of technology and music industry. 
We connect record labels, artists and distributors with digital service providers like Spotify and iTunes. 
Clients use our products to manage, distribute and promote their music and collect on the revenue. 


Don't hestitate to send me an e-mail if you need more info: kyon@fuga.com 

Thanks, 

Kyon 

--
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/f4b88d99-7564-4ba6-b0b0-41d9b15a34b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi there
I would recommend you to change your operation system to Ubuntu or some other Linux distributive, otherwise you will get strange errors very often.

About current problem - try to change parameter 'application' to 'default' in your app/views/layouts/application.html.erb line 7 and 8

--
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/19e0aa95-9852-4329-9659-d7a537298e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, November 21, 2017

You can do it like below

Section.find(:all, :conditions => { :url_section => params[:ssection] } )



On Tuesday, 21 November 2017 06:16:09 UTC+5:30, Ben Edwards wrote:
I have the following code for an active record condition in a controller

  @thus_section = Section.all( :conditions => [ "url_section = ?", params[:ssection] ] )

And when I try to goto to the webpage asociated with it I get the following error:

  ArgumentError in UpcomingEventsController#index


  wrong number of arguments (given 1, expected 0)


I was using  http://guides.rubyonrails.org/active_record_querying.html to work out how to do it.


What am I doing wrong?





--
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/45c64a84-8239-48de-bd3e-6090108bd1f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Dear ruby on rails group,

Good day!

I am now learning ruby on rails as a newbie to be able to make a simple website from scratch.

I am enrolled for onemonth course on Rails on Ruby for Web Development. One of their exercise is to change the default Rails page that can be seen from "localhost:3000" into a blank page with two sentences (basic strings).

I am running this with Git Bash on Windows. When inputting command "rails generate controller pages home" and open "localhost:3000/pages/home" in my browser, this is what I got instead of a blank page with two sentences.

And this is what I got in the Git Bash;

_______________________________________________________________________________________

Started GET "/pages/home" for 127.0.0.1 at 2017-11-21 13:42:40 +0800
Processing by PagesController#home as HTML
Rendering pages/home.html.erb within layouts/application
Rendered pages/home.html.erb within layouts/application (2.0ms)
Completed 500 Internal Server Error in 6707ms

ActionView::Template::Error (TypeError: Object doesn't support this property or
method):
4: <title>Omrails</title>
5: <%= csrf_meta_tags %>
6:
7: <%= stylesheet_link_tag 'application', media: 'all', 'data-turboli
nks-track': 'reload' %>
8: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'r
eload' %>
9: </head>
10:

app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html
_erb__466066971_29636976'
Started GET "/pages/home" for 127.0.0.1 at 2017-11-21 13:45:08 +0800
Processing by PagesController#home as HTML
Rendering pages/home.html.erb within layouts/application
Rendered pages/home.html.erb within layouts/application (1.0ms)
Completed 500 Internal Server Error in 1696ms

-------------------------------------------------------------------------


Please kindly help me to understand, as I am a complete newbie who wants to have a very basic back-end programming. Without understanding this I am afraid my learning has come to a pause.


Thanks very much for your kindness, and I hope you all have a great day!


Cordially,

Teguh Perdana Putra

--
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/dfca4920-3b99-4443-96f0-e4b88ecccc68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Monday, November 20, 2017

On Mon, Nov 20, 2017 at 4:46 PM, Ben Edwards <login@funkytwig.com> wrote:

> What am I doing wrong?

In order:

1. not having a test for the method in the first place
2. not showing us the complete code for that method
3. not showing us the full log entry and stack trace

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

Ruby on Rails

I have the following code for an active record condition in a controller

  @thus_section = Section.all( :conditions => [ "url_section = ?", params[:ssection] ] )

And when I try to goto to the webpage asociated with it I get the following error:

  ArgumentError in UpcomingEventsController#index


  wrong number of arguments (given 1, expected 0)


I was using  http://guides.rubyonrails.org/active_record_querying.html to work out how to do it.


What am I doing wrong?





--
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/c3564f0e-a8a8-4500-9b72-6dc913e4b1f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

AdequateErrors gem aims to overcome limitations of ActiveModel#errors object by offering more fine-grained controls. These include:
  • more expressive where query
  • turn off message's attribute prefix.
  • lazy evaluation of messages
This gem redesigned the API, placing it in its own object, co-existing with existing Rails API. Thus nothing will break, allowing you to migrate the code one at a time.

Please visit the Github repo for more details ^_^

--
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/14a0615d-80e0-4b34-a1e3-d2ea2a91dab6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Friday, November 17, 2017

I am looking for a RoR developer for a French startup operating in Paris (HQ, Operations) & Budapest (Tech team, Customer Support).


The company is developing the next generation of marketing performance measurement software. They have developed a Robot that scores the performance of every digital ad (keyword, banner, affiliate …) and makes investment recommendations on a daily basis.


Why is this different from other solutions?


It relies on collecting and analyzing unique users behavior to determine the capacity of ads to engage or to convert along with anomaly detection in order to identify fraudulent partners. And this is done Ad by Ad, User per User on a daily basis. Meaning whacking amount of data.

They are combining two of the fastest-growing fields on the planet (BigData & Artificial Intelligence) with a culture of performance, collaboration, and opportunity.


The job:

  • Full stack web development using Ruby on Rails, AngularJS, HTML5, CSS3, SASS, HAML, jQuery, CoffeeScript, Databases (esp. PostgreSQL) and shell.
  • Contribute to the architecture and evolution of our scalable Cloud platform
  • Conceive and develop the new engagement concepts and design
  • Find creative and elegant solutions to complex problems
  • Work in an agile environment where quick iterations and good feedback are a way of life
  • Continually look for opportunities to improve our platform, process, and business

Interested?
Contact me via boglarka.balint@gmail.com or +36 70 340 4230

--
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/c5dad88f-c55e-4f19-aa6d-7318307b07e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, November 16, 2017

Hi there,

I have a quick question,

I recently upgraded a rails application from 3.2 to 4.2, and then to 5.1.4. After the upgrade, have you noticed any exaggeration related to memory usage in production environment in latest rails versions?

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/113e82ac-7b32-4c09-8427-baab49e18d6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, November 15, 2017

Meet Nvoi. We're working on changing the way that companies hire contractors/contingent workers. We've created a platform that enables you to source, manage, hire and payroll contractors all in one place. The clever bit? We do it all for you and it's almost entirely automated.


We are ASX listed and growing fast, and we need 2 Full Stack Developers with Ruby on Rails skills (2 + years professional experience).  Other key skills are Javascript, HTML5, CSS3, React, MySQL or PostgreSQL, and nice to have skills are ElasticSearch, Lucene, Docker, Kubernetes, Terraform, Redis, Snowplow.  Previous experience at a leading startup would be ideal.  


The roles are full-time permanent and based at our North Sydney offices. Please note you must have Australian working rights to apply.


Please contact me for more info: rebecca.kennedy@meetnvoi.com 

www.meetnvoi.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/56048b35-0a28-4ca8-98a4-bd85e6ec3691%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Monday, November 13, 2017

Hello!

We are small but focused team of experienced RoR, React and iOS/Android developers
We specialise in rapid development of MVPs and if they prove to be hitting user interests targets we continue working on them to create production-ready application. 
This way we helped our German partners from MobileJob (https://www.mobilejob.com) to build successful business. Similar process was started and is still in progress at our American Client - POP Comics (https://www.popcomics.com). And most recently we helped Polish SAP Consulting company to implement their innovative idea (https://www.startsap.com). 

We can handle the whole process from idea to working product. This is possible because, besides strong technical capabilities, we are also good at product management, requirement analysis and designing (UX/UI). 
We mastered Scrum Project Management methodology and we feel like at home when working remotely with our Clients.

We charge on monthly basis for full team or single developers depending on cooperation model.  

If you find this short intro interesting or have some questions then let us know - perhaps there is something we could do together.

You can find more about us here: http://www.weblify.pl/en/
Send us the email: magda@weblify.pl

Magda



--
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/e812516b-9785-4928-b8ed-f17b240d2162%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, November 12, 2017

Try discourse or diaspora. They are great RoR apps.

On Sun, Nov 12, 2017 at 10:46 AM, Kishore Srinivas <kishynivas10@gmail.com> wrote:
I just finished the official Rails 5 blog app , and now  am looking for a good open source (rails 5) to learn more and be comfortable,which one would you highly recommend to pick up the pace ? Thank you !

--
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/b1027bc1-f3f6-4960-9ad7-0aa427d76d00%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/CAJR%2B9kZ%2Bn7guvBL1xG2nDD8TpwvRLF%3DyUQHui2kU_WVFb%2BdOhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Saturday, November 11, 2017

I just finished the official Rails 5 blog app , and now  am looking for a good open source (rails 5) to learn more and be comfortable,which one would you highly recommend to pick up the pace ? Thank you !

--
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/b1027bc1-f3f6-4960-9ad7-0aa427d76d00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

For HTML/CSS questions you can use https://jsfiddle.net/ (or something else that's similar in functionality), add your HTML and CSS in there and we can all have a look.
If someone can solve the issue they can update the code from jsfiddle and give you the solution.

If that's too much then can you share some screenshots with how is the page looking right now with the above code, and how do you expect it to look (to achieve the result you can tweak the CSS from any browser inspector.

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

Ruby on Rails

This all looks correct. What are you seeing that you don't expect?

Walter

> On Nov 11, 2017, at 2:53 PM, Joe Guerra <jguerra@jginfosys.com> wrote:
>
> Sorry, not sure where to post this on google groups. I will move it if I find a CSS google group.
>
> Anyways, I'm trying to overlay text onto an image (in my gallery) on upper and lower right corners.
> I know my problem has to do with nesting the <divs>. I'm just using placeholders for text now... (I'll sub in some database values eventually).
>
> Here's my css & bit of html.erb code...
> /* categories css file...
> /* Container holding the image and the text */
> .imageholder {
> position: relative;
> text-align: center;
> color: white;
> }
>
> /* Bottom left text */
> .bottom-left {
> position: absolute;
> bottom: 8px;
> left: 16px;
> }
>
> /* Top left text */
> .top-left {
> position: absolute;
> top: 8px;
> left: 16px;
> }
>
> /* Top right text */
> .top-right {
> position: absolute;
> top: 8px;
> right: 16px;
> }
>
> /* Bottom right text */
> .bottom-right {
> position: absolute;
> bottom: 8px;
> right: 16px;
> }
>
> /* Centered text */
> .centered {
> position: absolute;
> top: 50%;
> left: 50%;
> transform: translate(-50%, -50%);
> }
>
>
>
>
> div.img {
> margin: 5px;
> border: 0px solid #ccc;
> float: left;
> width: 180px;
> height: 400px;
> overflow: hidden;
> }
>
> div.img2 {
> margin: 5px;
> border: 0px solid #ccc;
> float: left;
> width: 255px;
> height: 285px;
> overflow: hidden;
> }
>
> div.img:hover {
> border: 0px solid #777;
> }
>
> div.img img {
> width: 100%;
> height: auto;
>
> }
>
> div.desc {
> padding: 15px;
> text-align: center;
> }
>
>
>
>
> <%
> @categories.each do |category| %>
> <div class="imageholder" >
>
> <div class="top-right">Top Right</div>
> <div class="bottom-right">Bottom Right</div>
>
> <div class="img2">
>
> <%= link_to category.name , category %>
>
> <%= link_to image_tag(category.picurl ), category %>
>
> </div>
> </div>
>
> 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/89dfe7ab-50b8-432d-b8b6-ea0a99f449fd%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/000A47C0-363A-4627-A8BE-E251B88345C7%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

That's a signal that you are not reloading something via TurboLinks that you expect to be there. When a full page reload makes it work again, that means that something JS related in the page needs to observe the event 'turbolinks:load' rather than just the page:load.

document.addEventListener("turbolinks:load", function() {
// ...
});

Walter

> On Nov 11, 2017, at 1:51 PM, Joe Guerra <jguerra@jginfosys.com> wrote:
>
> Ok, I just discovered if I reload the page hover will work.
>
> Not sure why it's not totally reloading the page after menu items have been click (while hover is working).
>
> On Saturday, November 11, 2017 at 11:05:48 AM UTC-5, Mugurel Chirica wrote:
> The best place to start is to completely read the Readme section for the plugin you are trying to use, https://github.com/CWSpear/bootstrap-hover-dropdown and after that try again and implement it on your website.
>
> Check the console without the plugin to see if you get any turbo links errors, if you don't get any error proceed with integrating the plugin with your new knowledge from the Readme document.
>
> If it's not working, then check the console again, if you get any new errors you are probably missing something and need to fix those js errors (make sure you check the gem dependencies as well).
>
>
> ok, I just tried $('.dropdown-toggle').dropdownHover(options); and I get ...
> VM155:1 Uncaught ReferenceError: options is not defined
> at <anonymous>:1:37
>
> Yes, that's true because I gave you the example from the Readme, you need to customise it for your code.
>
> $('YOUR_CLASS').dropdownHover({YOUR_OPTION: VALUE});
> Ex: $('.dropdown-toggle').dropdownHover({delay: 5000});
>
> This will tell you if the JavaScript implementation was correct, if you can't make that work in the console it's probably that.
>
>
> After following all of the above steps you still can't make it work, I'll ask for more details and try and help you get it working.
>
> 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/8e19cf61-ee40-4ca3-947b-a420aa91939a%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/FCF20334-E885-4F8B-AE57-7A63545984A4%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Sorry, not sure where to post this on google groups.  I will move it if I find a CSS google group.

Anyways, I'm trying to overlay text onto an image (in my gallery) on upper and lower right corners.
I know my problem has to do with nesting the <divs>.  I'm just using placeholders for text now...  (I'll sub in some database values eventually).

Here's my css & bit of html.erb code...
/* categories css file...
/* Container holding the image and the text */
.imageholder {
position: relative;
text-align: center;
color: white;
}

/* Bottom left text */
.bottom-left {
position: absolute;
bottom: 8px;
left: 16px;
}

/* Top left text */
.top-left {
position: absolute;
top: 8px;
left: 16px;
}

/* Top right text */
.top-right {
position: absolute;
top: 8px;
right: 16px;
}

/* Bottom right text */
.bottom-right {
position: absolute;
bottom: 8px;
right: 16px;
}

/* Centered text */
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}




div.img {
margin: 5px;
border: 0px solid #ccc;
float: left;
width: 180px;
height: 400px;
overflow: hidden;
}

div.img2 {
margin: 5px;
border: 0px solid #ccc;
float: left;
width: 255px;
height: 285px;
overflow: hidden;
}

div.img:hover {
border: 0px solid #777;
}

div.img img {
width: 100%;
height: auto;

}

div.desc {
padding: 15px;
text-align: center;
}
<% @categories.each do |category| %>
<div class="imageholder" >

<div class="top-right">Top Right</div>
<div class="bottom-right">Bottom Right</div>

<div class="img2">

<%= link_to category.name , category %>

<%= link_to image_tag(category.picurl ), category %>

</div>
</div>

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/89dfe7ab-50b8-432d-b8b6-ea0a99f449fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.