Ruby on Rails Saturday, January 30, 2016

Senior (Ruby) Data/Software Engineer

Culver City, CA Location

Full Time Permanent Employee – Direct Hire (W2 Only)

Base Salary Range: $120k - $150k, plus bonus, benefits and stock options.

 

All interested applicants for this opportunity must be currently authorized to work' in the United States on a full-time basis.

Unfortunately our client is not offering sponsorship for Work Visas at this time.

Why you want to work here:

  • Join an exciting mobile sensor data startup with a proven track record for success.
  • With over 200 active clients, you'll get the chance to work with some top minds, while still getting a big slice of the pie!
  • All new development, all new technology.
  • Only for the best and the brightest.

What You Will Do

  • Use Ruby/Rails, GO, and AWS to build an innovative contextual engine
  • Be the "Go To" Engineer for any help or advice
  • Diagnose and solve stack overflow problems

What Gets You the Job?

  • 6+ years' experience in software development
  • Solid CS fundamentals
  • A natural born builder who spends an immeasurable amount of time building and developing
  • A passion for at least 2 of the following: machine learning, mobile, large-scale data processing, or high throughput backend systems
  • Experience working with Cloud infrastructure (e.g. AWS) is a plus

 

 

David Leak | Technical Connections

310-873-5878 (Direct) | 310-479-8830 (Main)

dleak@tci-la.com | https://www.linkedin.com/in/daveleak

VIEW JOBS: www.technicalconnections.com

 

Technical Connections, Inc. is an Equal Employment Opportunity Search Firm committed to hiring all qualified individuals eligible to work in the United States without regard to Race, Religion, Sex, Color, Age National Origin or Disability.

 





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

Ruby on Rails Friday, January 29, 2016

No thanks.

On 01/28/2016 09:22 PM, Sandeep Jain wrote:

Phone/skype Hire

 

Location: Columbia, SC (Can be remote)

Duration: 10+ months

Rate: Open

 

This is a 10 month contract to update and expand an existing Ruby on Rails application. Work will include API development, writing API documentation, and other development work to meet contract deliverables. Responsible for the analysis, development, modification, installation, testing and maintenance of operating systems software. Possesses a strong understanding of systems programming, graphical user interfaces and control languages. Modifies, installs and prepares technical documentation for system software applications. Diagnoses, isolates and de-bugs software problems and performs problem resolution. Monitors systems capacity and performance, plans and executes disaster recovery procedures and provides Tier 2 technical support.

 

Daily Responsibilities:

Ruby Coding, Using Rails, Testing Code, Generating Ad Hoc Reports For Client As Needed, Providing Daily Status Updates To Team, Presence On Our Internal LM System During Work Hours.

 

Skills Needed:

Ruby, Rails, Git, Sql, Jquery, Rest API Experience, Web Security, Excellent Oral And Written Communication Skills, Test-Driven Development, Creating Technical Documentation

 

Preferred skills

Linux, OX X, JSON, Command Line, Atlassian Suite, SSH, HTML, SCSS

 

Required education: Bachelor's Degree preferred

 

Thanks

Sandeep

 

Sandeep Jain

Software People Inc.

sandeep.jain@softwarepeople.us

Ph: 631-863-0299, 631-410-4741, 631-921-2111 © Fax: 631-574-3122

Twitter: Software People @spincjobs

Certifications: NY MWBE, VA SWaM, DE OMWBE, MA MWBE

 

--
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/56aad986.67e8420a.c6474.577eSMTPIN_ADDED_BROKEN%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi Sandeep.

Gary Ferguson here based in San Diego, CA. I received your email and was interested in if your client would be interested in a Rock Star team to perform on this contract.

I have set up a team consisting of 3 Rails developers plus an HTML/CSS/Frontend developer who specialize in rebuilding and maintaining Ruby on Rails projects and offer 24 hours service.
We have people in San Diego, USA and Noida, India as well as Europe.

Please see this link for an article I wrote about the perils of hiring a Rock Star developer instead of a team. https://www.linkedin.com/pulse/safeguard-your-app-investment-gary-ferguson?trk=prof-post

Our monthly fee is $4000.00 for a full time developer and solutions architect (aka me) for this project. 

Regards
Gary Ferguson














On Thursday, January 28, 2016 at 10:59:40 PM UTC-8, Sandeep wrote:

Phone/skype Hire

 

Location: Columbia, SC (Can be remote)

Duration: 10+ months

Rate: Open

 

This is a 10 month contract to update and expand an existing Ruby on Rails application. Work will include API development, writing API documentation, and other development work to meet contract deliverables. Responsible for the analysis, development, modification, installation, testing and maintenance of operating systems software. Possesses a strong understanding of systems programming, graphical user interfaces and control languages. Modifies, installs and prepares technical documentation for system software applications. Diagnoses, isolates and de-bugs software problems and performs problem resolution. Monitors systems capacity and performance, plans and executes disaster recovery procedures and provides Tier 2 technical support.

 

Daily Responsibilities:

Ruby Coding, Using Rails, Testing Code, Generating Ad Hoc Reports For Client As Needed, Providing Daily Status Updates To Team, Presence On Our Internal LM System During Work Hours.

 

Skills Needed:

Ruby, Rails, Git, Sql, Jquery, Rest API Experience, Web Security, Excellent Oral And Written Communication Skills, Test-Driven Development, Creating Technical Documentation

 

Preferred skills

Linux, OX X, JSON, Command Line, Atlassian Suite, SSH, HTML, SCSS

 

Required education: Bachelor's Degree preferred

 

Thanks

Sandeep

 

Sandeep Jain

Software People Inc.

sandeep.jain@softwarepeople.us

Ph: 631-863-0299, 631-410-4741, 631-921-2111 © Fax: 631-574-3122

Twitter: Software People @spincjobs

Certifications: NY MWBE, VA SWaM, DE OMWBE, MA MWBE

 

--
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/abe50e0d-ad38-4cdb-a3cb-a969fab76c5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

You probably should need to use some permission management system, such as cancancan or pundit, with a roles system such as rolify to control who can do what.

In the majority of systems this is preferable to having an admin system and a user system (admins after all are only special users).


That way you can scope the resources so it only returns the users record if you are a user, or all records if you are an admin

--
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/d8ac6215-11ec-4cbc-8897-dc53ed8d26a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 29 January 2016 at 17:42, Walter Lee Davis <waltd@wdstudio.com> wrote:
>
>> On Jan 28, 2016, at 9:52 AM, Mendel Schneerson <lists@ruby-forum.com> wrote:
>>
>> Sorry I put the wrong line of HTML, the form works:
>>
>> Here it is in Chrome
>>
>> <form accept-charset="UTF-8" action="/customer/5" method="post">
>
> Is this looking at the raw HTML, or the rendered DOM? Chrome *might* be being pedantic here, and refusing to show GET attributes in a POST form. I recall somewhere in the mists of time that while that may work, it may also not be *standard* and thus a conforming UA would be within its rights to drop it, since POST trumps GET in all cases. See if the form works uniformly when you add a hidden field to it with :account_settings as the name, and remove the querystring from the form action. If you add that with a f.hidden_field helper, then you will need to change your controller to access the attribute from within the parent object's params hash, i.e.: params[:customer][:account_settings] rather than params[:account_settings].

Further to this a good plan is to copy/paste the complete generated
html into the html validator
https://validator.w3.org/#validate_by_input

Often when different browsers behave differently for the a site is it
down to invalid html, which the two browsers are interpreting
differently.

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

Ruby on Rails

> On Jan 28, 2016, at 9:52 AM, Mendel Schneerson <lists@ruby-forum.com> wrote:
>
> Sorry I put the wrong line of HTML, the form works:
>
> Here it is in Chrome
>
> <form accept-charset="UTF-8" action="/customer/5" method="post">

Is this looking at the raw HTML, or the rendered DOM? Chrome *might* be being pedantic here, and refusing to show GET attributes in a POST form. I recall somewhere in the mists of time that while that may work, it may also not be *standard* and thus a conforming UA would be within its rights to drop it, since POST trumps GET in all cases. See if the form works uniformly when you add a hidden field to it with :account_settings as the name, and remove the querystring from the form action. If you add that with a f.hidden_field helper, then you will need to change your controller to access the attribute from within the parent object's params hash, i.e.: params[:customer][:account_settings] rather than params[:account_settings].

Walter

>
>
> What is interesting is that in Firefox the tag shows up and works fine:
>
> <form accept-charset="UTF-8" action="/customer/5?account_settings=true"
> method="post" novalidate="novalidate">
>
> --
> Posted via http://www.ruby-forum.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/bbecfb64afafc7414dbd6a51584ef941%40ruby-forum.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/FAD87CAB-CC97-4D1F-83A3-4EA5E2C75204%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On Jan 25, 2016, at 9:22 PM, jai kumar <jaiksah@gmail.com> wrote:
>
> <% @fixture.each do |data| %>
> <% num = 1 %>
> <td> <%= data.matchdate %></td>
> <td><%= radio_button_tag(num,data.team ,:checked =>true) %><%= label :team, data.team %> </td>
> <td> <%= radio_button_tag(num,data.winteam) %><%= label :team, data.winteam %></td>
> <% num = num + 1 %>
>
> </tr>
> <% end %>
>
>
> how to work on params of radio button in case of multiple rows? for one row i can do it using params[num].
>

First off, I am reasonably sure that giving a form field a numerical name is going to fail, although I am not 100% sure that Rails doesn't do something clever about that. I know that in HTML, the ID attribute may never start with a number, not sure about the name attribute, though.

Second, if you want all of these choices to arrive at the server in a meaningful chunk, your best bet is to name them so that the browser will treat the value assignments like a nested hash, rather than a bunch of dissociated individual values. Take a look at this form submission in your console while it's running in development. What do you see in the params hash that prints out as the form is submitted?

Do your teams have a corresponding ID? Why not use that as your key, rather than the manually-incremented num?

Walter


> please suggest.
>
> thanks
> Jai
>
> --
> 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/5e2f92db-9c77-4151-825a-fb3d062e8a62%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/A54A8AFB-0A21-40F9-8610-B105705975C2%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 29 January 2016 at 14:51, Mukto Mona <lists@ruby-forum.com> wrote:
> I am a newbie in ruby on rails it's also my first ruby application.
> I want to filter results by clicking on checkbox which is coming from
> the database and showing on the right side of my webpage, the checkbox
> is lying on the left side. In the below I attached my webpage's
> screenshot for easy understanding. Anyone can help me, please, how can I
> solve this issue.

You need to be more specific in your question. It is not at all clear
which bit of the problem you are having trouble with. Is the problem
to do with positioning of chekboxes or filtering results or what?

What do you mean when you say you want to filter results by clicking
on a checkbox? If what you want is for the display in the browser to
change when you click a checkbox, without sending a request to the
server, then you probably need to write some javascript to do that.

Colin

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

Ruby on Rails

On Thu, 28 Jan 2016 22:22:20 -0500
"Sandeep Jain" <sandeep.jain@softwarepeople.us> wrote:

> Phone/skype Hire
>
>
>
> Location: Columbia, SC (Can be remote)
>
> Duration: 10+ months
>
> Rate: Open
>
>
>
> This is a 10 month contract to update and expand an existing Ruby on
> Rails application. Work will include API development, writing API
> documentation, and other development work to meet contract
> deliverables. Responsible for the analysis, development,
> modification, installation, testing and maintenance of operating
> systems software. Possesses a strong understanding of systems
> programming, graphical user interfaces and control languages.
> Modifies, installs and prepares technical documentation for system
> software applications. Diagnoses, isolates and de-bugs software
> problems and performs problem resolution. Monitors systems capacity
> and performance, plans and executes disaster recovery procedures and
> provides Tier 2 technical support.
>
>
>
> Daily Responsibilities:
>

> Ruby Coding, Using Rails, Testing Code, Generating Ad Hoc Reports For
> Client As Needed, Providing Daily Status Updates To Team, Presence On
> Our Internal LM System During Work Hours.
>
>
>
> Skills Needed:
>
> Ruby, Rails, Git, Sql, Jquery, Rest API Experience, Web Security,
> Excellent Oral And Written Communication Skills, Test-Driven
> Development, Creating Technical Documentation
>
>
>
> Preferred skills
>
> Linux, OX X, JSON, Command Line, Atlassian Suite, SSH, HTML, SCSS
>
>
>
> Required education: Bachelor's Degree preferred
>
>
>
> Thanks
>
> Sandeep
>
>
>
> Sandeep Jain
>
> Software People Inc.
>
> <mailto:sandeep.jain@softwarepeople.us>
> sandeep.jain@softwarepeople.us
>
> Ph: 631-863-0299, 631-410-4741, 631-921-2111 C Fax: 631-574-3122
>
> Twitter: Software People @spincjobs
>
> Certifications: NY MWBE, VA SWaM, DE OMWBE, MA MWBE
>
>
>

I saw your posting to the rubyonrails Googlegroups mailing list. I'd
like to speak to you about this opportunity. Thank you.

https://www.linkedin.com/in/paul-mccubbins-7a96b756

--
Paul Nicholas McCubbins
pnmccb at gmail.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/20160129094400.29c588ab%40dexter.internalnet.zzz.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Fri, Jan 29, 2016 at 6:51 AM, Mukto Mona <lists@ruby-forum.com> wrote:
> I am a newbie in ruby on rails it's also my first ruby application.
> I want to filter results by clicking on checkbox

http://www.catb.org/esr/faqs/smart-questions.html

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
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/CACmC4yBWuA1fHF%2Bu1QgR5HoHc8cpWznqCyS%2BHDEgMJPTh-OxgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Thu, Jan 28, 2016 at 11:04 PM, Abhishek Acharya <lists@ruby-forum.com> wrote:
> i am doing a project for futsal booking. Now i can book a ground of
> futsal but having problem to book futsal with many ground. How can i do
> it ? I want show the ground number when its booked along with futsal_id

http://www.catb.org/esr/faqs/smart-questions.html

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
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/CACmC4yA2ptYYuvzAd09mG%3DyZp-v51tGW3ugj%3DaCciAmKkZJBoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Add some scopes to your model





The in the controller apply the scope if the parameters for the checkbox is present.

Not knowing your field names and form field names

model
 scope :education, ->(degree)  {where(education: degree)}


controller
@resumes = Resume.all
@resumes = @resumes.education(params[:degree]) if params[:degree].present?      #not really correct if you are using checkboxes I bet, but should give you an idea of where to start.




On Jan 29, 2016, at 9:46 AM, Mukto Mona <lists@ruby-forum.com> wrote:

I am a newbie in ruby on rails it's also my first ruby application.
I want to filter results by clicking on checkbox which is coming from
the database and showing on the right side of my webpage, the checkbox
is lying on the left side. In the below I attached my webpage's
screenshot for easy understanding. Anyone can help me, please, how can I
solve this issue.

Attachments:
http://www.ruby-forum.com/attachment/11247/FireShot_Pro_Screen_Capture__008_-__Total_Resumes_I_Hire_Bangladeshi__-_localhost_3000_resumes.png


--
Posted via http://www.ruby-forum.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/ac3900089c0b0bb48cb3a6734a44064d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am a newbie in ruby on rails it's also my first ruby application.
I want to filter results by clicking on checkbox which is coming from
the database and showing on the right side of my webpage, the checkbox
is lying on the left side. In the below I attached my webpage's
screenshot for easy understanding. Anyone can help me, please, how can I
solve this issue.

Attachments:
http://www.ruby-forum.com/attachment/11249/FireShot.png


--
Posted via http://www.ruby-forum.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/9c5b5260eb254d327346fb1c3be256a9%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am a newbie in ruby on rails it's also my first ruby application.
I want to filter results by clicking on checkbox which is coming from
the database and showing on the right side of my webpage, the checkbox
is lying on the left side. In the below I attached my webpage's
screenshot for easy understanding. Anyone can help me, please, how can I
solve this issue.

Attachments:
http://www.ruby-forum.com/attachment/11247/FireShot_Pro_Screen_Capture__008_-__Total_Resumes_I_Hire_Bangladeshi__-_localhost_3000_resumes.png


--
Posted via http://www.ruby-forum.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/ac3900089c0b0bb48cb3a6734a44064d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, January 28, 2016

i am doing a project for futsal booking. Now i can book a ground of
futsal but having problem to book futsal with many ground. How can i do
it ? I want show the ground number when its booked along with futsal_id
...

--
Posted via http://www.ruby-forum.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/8428cd2475d4d69d538ccb48118ad7ae%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

OK now I know what I actually need. I just need a Puma daemon service. I have found this link:https://github.com/puma/puma/tree/master/tools/jungle/init.d
Hope it will help me. I will test it in the afternoon.

On Friday, January 29, 2016 at 7:22:51 AM UTC+8, aaron wrote:
Hi I am new to RoR. 

I am on a mission to deploy my SpreeCommerce store to my VPS. It looks like a simple task but I have been working on it for 3 days.

Installing Spree and running it on development mode is a piece of cake. But I have no experience on deploying the app and automating the service on VPS.

Here is my plan:

    Deploy it on a Puma web server using Nginx as a reverse proxy server.

    Use some auto deployment  tool (such as Capistrano or Phusion Passenger) to deploy it as a service so I don't need to monitor the server manually.

What I have done:

    installed Puma and run SpreeCommerce 3.0 on Puma web server,

    Config Nginx to run my SpreeCommerce rails app on my VPS ip.

Now I need to use a deployment tool to deploy it as a service,

I have looked into Capistrano. I know it can do a lot of jobs, such as data migration and pulling source from a repository. But to be honest all I want is to deploy my
online store as a service on my VPS so I can start and stop it and run it at background. Capistrano is too much for me and the configuration looks so daunting.

Can I still find a simpler way to do what I need? Hope you can give me some suggestions. Thank you.

Best,

Aaron

--
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/e3399449-d547-460a-b124-748d80c268c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Phone/skype Hire

 

Location: Columbia, SC (Can be remote)

Duration: 10+ months

Rate: Open

 

This is a 10 month contract to update and expand an existing Ruby on Rails application. Work will include API development, writing API documentation, and other development work to meet contract deliverables. Responsible for the analysis, development, modification, installation, testing and maintenance of operating systems software. Possesses a strong understanding of systems programming, graphical user interfaces and control languages. Modifies, installs and prepares technical documentation for system software applications. Diagnoses, isolates and de-bugs software problems and performs problem resolution. Monitors systems capacity and performance, plans and executes disaster recovery procedures and provides Tier 2 technical support.

 

Daily Responsibilities:

Ruby Coding, Using Rails, Testing Code, Generating Ad Hoc Reports For Client As Needed, Providing Daily Status Updates To Team, Presence On Our Internal LM System During Work Hours.

 

Skills Needed:

Ruby, Rails, Git, Sql, Jquery, Rest API Experience, Web Security, Excellent Oral And Written Communication Skills, Test-Driven Development, Creating Technical Documentation

 

Preferred skills

Linux, OX X, JSON, Command Line, Atlassian Suite, SSH, HTML, SCSS

 

Required education: Bachelor’s Degree preferred

 

Thanks

Sandeep

 

Sandeep Jain

Software People Inc.

sandeep.jain@softwarepeople.us

Ph: 631-863-0299, 631-410-4741, 631-921-2111 © Fax: 631-574-3122

Twitter: Software People @spincjobs

Certifications: NY MWBE, VA SWaM, DE OMWBE, MA MWBE

 

Ruby on Rails

On Wednesday, January 27, 2016 at 10:46:39 AM UTC+1, Ruby-Forum.com User wrote:
But if so, @user from fixtures should also have
reset_token now (if its reset_digest was influenced by create action
(specifically create_reset_digest method). Can someone please take a
look?

I am also studying the same tutorial and I may have an explanation if you do not mind the fact that if you are lucky I am as an inexperienced user as you are.
Hopefully there will be someone more experienced than us who check my answer in case I wrote bullshit.

You may find a similar context for your question at chapter 8 when a remember_token is created and the book says that "there's no way for the test to get access to it".
As far as I have understood, the point is in the call of 'user.remember_token' or, in your case, 'user.reset_token'. In the fixtures, user does not have a reset_token: look at the fixtures and you will see, there is not a reset_token attribute. It is true that it takes that attribute dynamically via the create action of the controller, but once you exit from the action, user is back again the user from the fixtures, with no reset_token attribute (that's why is defined 'virtual': once you exit from the create action of the controller it is lost).
Using 'assigns(:user)' let you have access directly to the user defined in the create action and retrieve the token.
Does it make sense?

--
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/2f506564-352d-41b7-958b-32b8477d6522%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

So something is definitely broken in your Javascripts, or the views - the scaffold code there is what I am used to seeing, just referencing the record rather than the explicit ID you pass in.

I am at a loss as to why Windows is complaining when you change the name, or indeed why it would not respond to the standard name of application.js - which has no meaning to Windows that I am aware of


> On 28 Jan 2016, at 17:24, Bob Tian <lists@ruby-forum.com> wrote:
>
> I actually did not rename it to default.js, but when I try to do that
> and access localhost I get an error:
>
> ExecJS::ProgramError in People#index
> Showing: /app/views/layouts/application.html.erb where line #6 raised:
> TypeError: Object doesn't support this property or method
>
> and line 6 which is:
>
> <%= javascript_include_tag 'default', 'data-turbolinks-track' => true %>
>
>
> I tried using scaffold and it does the same thing, it can add, but it
> does not delete, it directs me to /posts/1 where it just displays the
> data for id:1
>
> The code in views is different from mine:
>
> index:
>
> <td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are
> you sure?' } %></td>
>
> controller:
>
> def destroy
> @post.destroy
> respond_to do |format|
> format.html { redirect_to posts_url, notice: 'Post was
> successfully destroyed.' }
> format.json { head :no_content }
> end
> end
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/Kf-1pDBEmK0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/460fe4de0315f223782195ada5312029%40ruby-forum.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/C350179F-CABF-4FA1-BC4A-271585E1ABF2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hm, I found this from stackoverflow
http://stackoverflow.com/questions/7281907/rails-3-1-issue-with-javascript-include-tag-in-application-html-erb

and if I remove //= require_tree and //= turbolinks

then I can include application.js and the add/delete does work for
scaffold, but I still cannot remove people

--
Posted via http://www.ruby-forum.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/ff9ba3f143170a06a34840846f50f443%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I actually did not rename it to default.js, but when I try to do that
and access localhost I get an error:

ExecJS::ProgramError in People#index
Showing: /app/views/layouts/application.html.erb where line #6 raised:
TypeError: Object doesn't support this property or method

and line 6 which is:

<%= javascript_include_tag 'default', 'data-turbolinks-track' => true %>


I tried using scaffold and it does the same thing, it can add, but it
does not delete, it directs me to /posts/1 where it just displays the
data for id:1

The code in views is different from mine:

index:

<td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are
you sure?' } %></td>

controller:

def destroy
@post.destroy
respond_to do |format|
format.html { redirect_to posts_url, notice: 'Post was
successfully destroyed.' }
format.json { head :no_content }
end
end

--
Posted via http://www.ruby-forum.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/460fe4de0315f223782195ada5312029%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi I am new to RoR. 

I am on a mission to deploy my SpreeCommerce store to my VPS. It looks like a simple task but I have been working on it for 3 days.

Installing Spree and running it on development mode is a piece of cake. But I have no experience on deploying the app and automating the service on VPS.

Here is my plan:

    Deploy it on a Puma web server using Nginx as a reverse proxy server.

    Use some auto deployment  tool (such as Capistrano or Phusion Passenger) to deploy it as a service so I don't need to monitor the server manually.

What I have done:

    installed Puma and run SpreeCommerce 3.0 on Puma web server,

    Config Nginx to run my SpreeCommerce rails app on my VPS ip.

Now I need to use a deployment tool to deploy it as a service,

I have looked into Capistrano. I know it can do a lot of jobs, such as data migration and pulling source from a repository. But to be honest all I want is to deploy my
online store as a service on my VPS so I can start and stop it and run it at background. Capistrano is too much for me and the configuration looks so daunting.

Can I still find a simpler way to do what I need? Hope you can give me some suggestions. Thank you.

Best,

Aaron

--
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/ac7afae2-72c2-45cf-9410-986ee14b23ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 28 January 2016 at 15:16, Benyamin Pm <lists@ruby-forum.com> wrote:
> hi everyone.
>
> i'm new in ruby/On rails
>
> i want to start lerning ruby on rails from zero to 100! i tried in
> tutorialpoints.com && The best source to start but either have problems!
> when i start , in second or third step i have problems!
>
> i just want to know , what is the best resource for learning ruby on
> rails?
> help please

I always suggest working right through railstutorial.org, which is
free to use online, and can be run in the browser on cloud9 without
having to even install anything on the PC. That means that you can
run the tutorial on a Windows machine, though when you get to doing
real development it is best to move on to a Linux OS such as Ubuntu
(or use a mac).

Colin


>
> --
> Posted via http://www.ruby-forum.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/84d85dc74075f6cf568a0acdac70c471%40ruby-forum.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%3D0gLu0MCXworUJ3BarN9hxTSEJBmD%2BLQN630R5Bb7rj9B9yg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

hi everyone.

i'm new in ruby/On rails

i want to start lerning ruby on rails from zero to 100! i tried in
tutorialpoints.com && The best source to start but either have problems!
when i start , in second or third step i have problems!

i just want to know , what is the best resource for learning ruby on
rails?
help please

--
Posted via http://www.ruby-forum.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/84d85dc74075f6cf568a0acdac70c471%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Sorry I put the wrong line of HTML, the form works:

Here it is in Chrome

<form accept-charset="UTF-8" action="/customer/5" method="post">


What is interesting is that in Firefox the tag shows up and works fine:

<form accept-charset="UTF-8" action="/customer/5?account_settings=true"
method="post" novalidate="novalidate">

--
Posted via http://www.ruby-forum.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/bbecfb64afafc7414dbd6a51584ef941%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I'm very new to javascript so don't judge hard (any suggestions or
comments would be highly appreciated).

I have a form in my rails app (haml file):

= simple_form_for(@book, remote: true) do |f|
.row
.form-group
= f.input :book_title, as: :string, label: "Title of a book"
%br
= f.input :pages_number, as: :string, label: "Number of pages"
%br
.form-actions
= f.button :submit, "Create", class: "btn btn-success"
= link_to t('buttons.cancel'), '#', onclick: "$.modal.close()",
class: 'btn btn-warning pull-right'


The action in controller which opens a form:

def new
@book = Book.new
end


The action in controller which saves a form:

def create
end


What I'm trying to do is check whether input number of pages is bigger
than 10. I want to create a confirm box.


I was trying to save @pages_number = params[:pages_number] in create
action, and use data: (@pages_number < 10 ? { confirm: "Are you sure?" }
: nil) in the view, but it didn't work.


Do I need to use Javascript in this case?

--
Posted via http://www.ruby-forum.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/ec68a0feb6e62a436b1e285e7f1a3d3d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 27 January 2016 at 19:09, Mendel <mendel@nofraud.com> wrote:
> Hi I am trying to disable chrome's html5 validations. I have added
> :html => {:novalidate => 'novalidate'}
> to the form tag but when I check the form in the browser it is not there and
> the validations keep me from submitting the form.
>
> Here is all the relevant (I think) code.
>
> Enter code here...form_for(:customer, url: {:action => 'update', :id =>
> @customer.id, :account_settings => true},:html => {:novalidate =>
> 'novalidate'}) do |f|
> = render(:partial => 'form', :locals => {:f => f})
>
> And this is what the form shows in HTML
> <input class="form-control" id="customer_contact_email"
> name="customer[contact_email]" pattern="false" type="email">

Are you saying the form tag does not show at all?
Is it ok in a different browser?
Have you got the = sign?
<%= form_for...

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%3D0gLu-8gFmWZSmtcDx%3DzF2Qm6Tfdm-cgeQ5Jd2xEAE3P9gag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I assume therefore you also renamed the /app/assets/javascripts/application.js to default.js

sorry I do not develop under Windows, so cannot be sure if there is not some other issue related to that, there are a number of shortcomings when you use rails on Windows, but that is mainly gem support, not JavaScript

Just as an interest, can you create a blank application, and do something like

rails g scaffold something field1 field2

And then check the code it generated in the views - I doubt it is different on Windows, but I cannot be sure

Also run the app and see if you can add/delete ok


Sent from my iPad

> On 28 Jan 2016, at 01:48, Bob Tian <lists@ruby-forum.com> wrote:
>
> Mike S. wrote in post #1180984:
>> In the delete link, you need to use the delete method-Rails now expects
>> a delete verb, where as your code is generating a get I believe
>>
>> So
>>
>>> <%= link_to 'Delete', :controller => "people", :action
>>> => "destroy", :id => e, :method => :delete %>
>>
>>
>>
>> Sent from my iPhone
>
> I have the changes and it just directs me to the show page displaying
> the info like before. When I go back to /people the data is still there.
> In the logs it says:
>
> Started GET "/people/1?method=delete" for ::1 at 2016-01-27 17:38:42
> -800
> Processing by PeopleController#show as HTML
> Parameters: {"method" => "delete", "id" => "2"}
> Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id"
> = $1 LIMIT 1 [["id", 2]]
> Rendered people/show.html.erb within layouts/application (0.0ms)
> Completed 200 OK in 26ms (views: 25.0 ms | ActiveRecord :0.5 ms)
>
> ...
>
> Started GET "/stylesheets/default.css" for ::1 at ..
>
> ...
>
> Started GET "/javascripts/default.js" for ::1 at ..
>
>
> I did some searching and I was wondering if it is the javascript because
> I changed the application.html.erb from
>
> <%= stylesheet_link_tag 'application'
> <%= javascript_include_tag 'application'
>
> and replaced 'application' to 'default' since I am on windows and the
> 'application' was causing problems
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/Kf-1pDBEmK0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/333623f4c1f2f74c51c21683ef97854d%40ruby-forum.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/57C63773-DDFA-4789-81E4-61534FD97E32%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi tamouse,

tamouse pontiki writes:


>> Is there another way doing that? Or is this the recommend way?
>
> If you want it for only one action, Jay call it in the action.

I tried it, but I have a view, so interesting that it doesn't work,
because they have a redirect_to inside. If I put it in the action, i
get the "dont call more than one redirect_to or render" message, which I
could fix by using some if statements, but this looks ugly. I think the
before_action's will stop if the first gets a redirect_to, so the next
will not be run anymore, and this is what I want.

Martin

--
Lösungen statt Diagnosen

--
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/87powmjcvb.fsf%40kaffanke.at.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, January 27, 2016


On Jan 27, 2016 1:13 PM, "Martin" <mylists@kaffanke.at> wrote:
>
> Hi there,
>
> If I want a before_action for only one action, like
>
> before_action check_something_with_redirect_if_any, only: :index
>
> Is there another way doing that? Or is this the recommend way?

If you want it for only one action,  Jay call it in the action.

>
> If not what else could work here?
>
> Thanks,
> Martin
>
> --
> 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/2d11149f-2cba-4809-b769-ee9604636c11%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/CAHUC_t9Rj5rf0j5FAoUGJFHpChzXkfX6iMfFKDVK6V5YYDRZkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Mike S. wrote in post #1180984:
> In the delete link, you need to use the delete method-Rails now expects
> a delete verb, where as your code is generating a get I believe
>
> So
>
>> <%= link_to 'Delete', :controller => "people", :action
>> => "destroy", :id => e, :method => :delete %>
>
>
>
> Sent from my iPhone

I have the changes and it just directs me to the show page displaying
the info like before. When I go back to /people the data is still there.
In the logs it says:

Started GET "/people/1?method=delete" for ::1 at 2016-01-27 17:38:42
-800
Processing by PeopleController#show as HTML
Parameters: {"method" => "delete", "id" => "2"}
Person Load (0.5ms) SELECT "people".* FROM "people" WHERE "people"."id"
= $1 LIMIT 1 [["id", 2]]
Rendered people/show.html.erb within layouts/application (0.0ms)
Completed 200 OK in 26ms (views: 25.0 ms | ActiveRecord :0.5 ms)

...

Started GET "/stylesheets/default.css" for ::1 at ..

...

Started GET "/javascripts/default.js" for ::1 at ..


I did some searching and I was wondering if it is the javascript because
I changed the application.html.erb from

<%= stylesheet_link_tag 'application'
<%= javascript_include_tag 'application'

and replaced 'application' to 'default' since I am on windows and the
'application' was causing problems

--
Posted via http://www.ruby-forum.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/333623f4c1f2f74c51c21683ef97854d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

In the delete link, you need to use the delete method-Rails now expects a delete verb, where as your code is generating a get I believe

So

<%= link_to 'Delete', :controller => "people", :action
=> "destroy", :id => e, :method => :delete %>


Sent from my iPhone

On 27 Jan 2016, at 18:54, Bob Tian <lists@ruby-forum.com> wrote:

Hello, thanks to you I have been able to add in the data. I also changed
and cleaned up the code and used the convention with regards to the
variables. I have another question regarding the destroy/deleting data,
when I click on delete, it directs me to show where i can view the data,
but does not delete anything. Here is my updated code


peoplecontroller:
class PeopleController < ApplicationController

   def index
       @people = Person.all
   end


   def show
       @person = Person.find(params[:id])
   end


   def new
       @person = Person.new
   end


   def create
       @person = Person.new(person_params)
       @person.save
       redirect_to :action => :index
   end


   def edit
       @person = Person.find(params[:id])
   end


   def update
       @person = Person.find(params[:id])
       @person.update(person_params)
       redirect_to :action => :show, :id => @person
   end


   def destroy
       @person = Person.find(params[:id])
       @person.destroy
       redirect_to :action => :index
   end

   private
   def person_params
       params.require(:person).permit(:name, :weight, :height, :color,
:age)
   end
end

======================================================================
index:

<h1> People list</h1>
<table>
   <thead>
       <tr>
           <th>Name</th>
           <th> Weight</th>
           <th> Height</th>
           <th> Color</th>
           <th> Age</th>
           <th colspan="4"></th>
       </tr>
   </thead>
   <tbody>
       <% @people.each do |e| %>
       <tr>
           <td><%= e.name %></td>
           <td><%= e.weight %></td>
           <td><%= e.height %></td>
           <td><%= e.color %></td>
           <td><%= e.age %></td>
           <td><%= link_to 'Show', :controller => "people", :action =>
"show", :id => e %></td>
           <td><%= link_to 'Edit', :controller => "people", :action =>
"edit", :id => e %></td>
           <td><%= link_to 'Delete', :controller => "people", :action
=> "destroy", :id => e %></td>
       </tr>
       <% end %>
    </tbody>
</table>
<br>
<%= link_to 'New Input', :controller => 'people', :action => 'new' %>

=====================================================================
show.html.erb


<p id="notice"><%= notice %></p>
<p>
 <strong>Name:</strong>
 <%= @person.name %>
</p>

<p>
 <strong>Weight:</strong>
 <%= @person.weight %>
</p>

<p>
 <strong>Height:</strong>
 <%= @person.height %>
</p>

<p>
 <strong>Color:</strong>
 <%= @person.color %>
</p>

<p>
 <strong>Age:</strong>
 <%= @person.age %>
</p>

--
Posted via http://www.ruby-forum.com/.

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

Ruby on Rails

On 27 January 2016 at 18:54, Bob Tian <lists@ruby-forum.com> wrote:
> Hello, thanks to you I have been able to add in the data. I also changed
> and cleaned up the code and used the convention with regards to the
> variables. I have another question regarding the destroy/deleting data,
> when I click on delete, it directs me to show where i can view the data,
> but does not delete anything. Here is my updated code

Look in log/development.log and when you click delete you should see
the request and whether it is calling the destroy method. You can
insert diagnostic code in your methods using stuff like
def destroy
logger.info "In destroy"
@person = Person.find(params[:id])
logger.info @person.inspect
@person.destroy
redirect_to :action => :index
end

and your logger output will appear in the log file.

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

Ruby on Rails

Thanks Matthew, I'll alert the LTS team to this thread for their input :)



On Wednesday, January 27, 2016 at 11:34:18 AM UTC+13, matthewd wrote:

> Rails LTS has released their own patched version of 3.2.22 with the following notes:
>
> [CVE-2016-0753] Possible Input Validation Circumvention in Active Model
> [..]
> Despite what the announcement said, Rails 3.2 is affected. The issue is patched in the new LTS release.
>
> [CVE-2015-7581] Object leak vulnerability for wildcard controller routes in Action Pack
> [..]
> Despite what the announcement said, Rails 3.2 is affected. The issue is patched in the new LTS release.
>
> Given they've identified 3.2 is affected by those two issues, will there be a new official release of 3.2.22 to patch those two vulnerabilities also?


Details of security issues welcome:

> If you run in to security issues, please follow the reporting process which can be found [here](http://rubyonrails.org/security/).


We obviously evaluated all the issues for applicability to 3.2; it's very possible we missed something, but if so, we may need a more specific hint than "it's there". Anyway, we'll have another look.


Matthew


--
mat...@trebex.net

--
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/4849a25d-cdd3-47ed-bd96-11a73c1d6034%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.