[Rails] Re: Email preview in production in rails 4

2015-02-18 Thread Hristo Peev
Hi, 

I have a clue, but I haven't tested it yet.

Try to add the routes in your routes.rb file manually.

If you have a chance to test this, please, write a line about the results.

Thanks!

On Wednesday, February 18, 2015 at 6:27:11 PM UTC+2, Harshvardhan Parihar 
wrote:
>
> Did u get the solution for this issue.
>
> On Thursday, December 11, 2014 at 9:47:29 PM UTC+5:30, Hristo Peev wrote:
>>
>> Hello,
>>
>> I am using rails 4.1.1 and ActionMailer::Preview. In development 
>> environment everything is working excellent.
>>
>> But in production environment the preview routes are not accessible. I 
>> store the previews in test/mailers/previews/
>> Is is possible to enable them for production?
>>
>> Thanks!
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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/18fb5258-5eac-4890-8514-1f7d0128d946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] #link_to is throwing error - ArgumentError: arguments passed to url_for can't be handled.

2015-02-18 Thread tamouse pontiki
If I call link_to with helper like you are from rails console (running
pry-rails), I get the same error. But when I put it into a view, it
works

On Wed, Feb 18, 2015 at 10:42 AM, Arup Rakshit  wrote:

> Hi,
>
> I have the below resource table Comment controller :
>
> [arup@app]$ rake routes | grep comments
>   commentsGET/comments(.:format)  comments#index
>POST   /comments(.:format)
> comments#create
>new_comment  GET/comments/new(.:format)  comments#new
>   edit_comment   GET/comments/:id/edit(.:format) comments#edit
>comment GET/comments/:id(.:format)  comments#show
>PATCH  /comments/:id(.:format)
> comments#update
>PUT/comments/:id(.:format)
> comments#update
>DELETE /comments/:id(.:format)
> comments#destroy
>
> Now, I am trying to figure out what I read from the guide -
> http://guides.rubyonrails.org/v4.1.8/routing.html#creating-paths-and-urls-from-objects
>
> ===
> If you wanted to link to just a magazine:
> For other actions, you just need to insert the action name as the first
> element of the array:...
> ===
>
> I tried -
>
> helper.link_to("Show comment", [Comment.first], method: :get)
> helper.link_to("Show comment", Comment.first, method: :get)
> helper.link_to("Show comment", [:show, Comment.first])
> helper.link_to("Show comment", Comment.first, method: :get)
>
> Always I'm getting the error as : ArgumentError: arguments passed to
> url_for can't be handled. Please require routes or provide your own
> implementation
>
> Any idea what am I doing wrong ? I am not getting the result as guide
> promised. :-)
>
> --
> 
> Regards,
> Arup Rakshit
> 
> Debugging is twice as hard as writing the code in the first place.
> Therefore, if you write the code as cleverly as possible, you are, by
> definition, not smart enough to debug it.
>
> --Brian Kernighan
>
> --
> 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+unsubscr...@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/1429708.zPV1iYpq3S%40linux-wzza.site
> .
> 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+unsubscr...@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_t-Pnxr1kbX-vO%3D-EYpqZEGCHF1RceBEJM4cdUAXRN9Upg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: action mailer settings and dkim signing

2015-02-18 Thread Matt Jones


On Saturday, 14 February 2015 21:17:21 UTC-5, Stephen Burke wrote:
>
> I am trying to figure out why this block of code in my 
> environments/production.rb file is causing the dkim signing to break.  I 
> have email being sent from a rake task with my UserMailer class.  It is 
> derived from Devise::Mailer.  If I have the action_mailer configuration 
> block within the "config.after_initialize" the dkim signature does not go 
> through.  If I don't have that line "after_initialize" the signature goes 
> through.  Can someone shed some light on this for me?
>
> Here's the code for my UserMailer class and the production.rb file. 
>
> user_mailer.rb
>
> require "#{Rails.root}/app/helpers/user_helper"
> include UserHelper
>
> class UserMailer < Devise::Mailer
>   helper :application # gives access to all helpers defined within 
> `application_helper`.
>   include Devise::Controllers::UrlHelpers # Optional. eg. 
> `confirmation_url`
>   default from: "Save The Sparkles  >",
>   reply_to: "con...@savethesparkles.com "
>   ...
> end
>
>
> environments/production.rb 
>
> config.action_mailer.asset_host = 'http://savethesparkles.com'
>
> config.action_mailer.default_url_options = { host: 'savethesparkles.com' }
> config.after_initialize do
>   config.action_mailer.perform_deliveries = true
>   config.action_mailer.raise_delivery_errors = true
>   config.action_mailer.delivery_method = :smtp
>   config.action_mailer.smtp_settings = {
> address:  'email-smtp.us-east-1.amazonaws.com',
> port: 587,
> domain:   'savethesparkles.com',
> user_name:ENV['AWS_SES_USER'],
> password: ENV['AWS_SES_PASS'],
> authentication:   :login,
> enable_starttls_auto: true
>   }
> end
>
>
The documentation for Rails::Railtie::Configuration describes 
after_initialize as the "last configurable block to run, called after 
frameworks initialize". ActionMailer's own initialization routine copies 
the values from config.action_mailer *before* the code above sets them. So 
the behavior you've described makes sense.

A better question is, why is having after_initialize here important? What's 
the intent?

--Matt Jones

-- 
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+unsubscr...@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/cd54be92-1652-4b2b-9199-8371a70c8581%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Learn Ruby on Rails before I start building my web app?

2015-02-18 Thread Colin Law
On 18 February 2015 at 20:18, Stella Buttercup
 wrote:
> I know I'm ready to learn it. What I asked was: Should I learn Ruby on Rails
> before I start coding? Or do I build it with HTML, CSS, and JavaScript and
> then modify it to fit the patterns? I don't understand the best way to go
> about it.

Don't develop the pages first, or you will end up with html/js that
does not easily fit with rails.  Start with Rails and work up to the
UI.  Apart from anything else you will find a lot of the html is
generated by helpers.

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+unsubscr...@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%3D0gLuSnKyVTS9Gg47mhHw6u-Rzq0dXeuOBg%2BukBnWopToj%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Learn Ruby on Rails before I start building my web app?

2015-02-18 Thread TTambe
I think I'm confused by your question. Rails is a framework that uses the
Ruby language. Are you asking if you should learn Ruby first? If that's
your question, then I'd say you don't have to do it first, but it would
help. If you go through one of the tutorials that I recommended, then
you'll use Ruby as you go through it and pick it up. You could pick up
Chris Pine's book, "Learn To Program", which is a good first Ruby book.


On Wed, Feb 18, 2015 at 3:18 PM, Stella Buttercup <
stellabutterc...@gmail.com> wrote:

> I know I'm ready to learn it. What I asked was: Should I learn Ruby on
> Rails before I start coding? Or do I build it with HTML, CSS, and
> JavaScript and then modify it to fit the patterns? I don't understand the
> best way to go about it.
>
>
>
>
> On Wednesday, February 18, 2015 at 9:23:55 AM UTC-8, Stella Buttercup
> wrote:
>>
>>  I am a new programmer. I know Javascript, CSS, and HTML. I've never
>> written a web app. I can cobble together code for my first try, but it is
>> likely that as a beginner programmer code, it can quickly become an
>> unmaintainable mess. I learned that Ruby on Rails helps build applications
>> using basic patterns to inform better code design. Should I learn Ruby on
>> Rails before I start coding? Or do I build it with HTML, CSS, and
>> JavaScript and then modify it to fit the patterns? I don't understand the
>> best way to go about it.
>>
>  --
> 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+unsubscr...@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/4900c774-6804-4abe-96c4-a161be7a4b26%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+unsubscr...@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/CAEdg5qTYn9ir-i4gQ3DqLoAKwuzsx-dvcwWY%2BQb706YR7TLmOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Learn Ruby on Rails before I start building my web app?

2015-02-18 Thread Stella Buttercup
I know I'm ready to learn it. What I asked was: Should I learn Ruby on 
Rails before I start coding? Or do I build it with HTML, CSS, and 
JavaScript and then modify it to fit the patterns? I don't understand the 
best way to go about it.




On Wednesday, February 18, 2015 at 9:23:55 AM UTC-8, Stella Buttercup wrote:
>
>  I am a new programmer. I know Javascript, CSS, and HTML. I've never 
> written a web app. I can cobble together code for my first try, but it is 
> likely that as a beginner programmer code, it can quickly become an 
> unmaintainable mess. I learned that Ruby on Rails helps build applications 
> using basic patterns to inform better code design. Should I learn Ruby on 
> Rails before I start coding? Or do I build it with HTML, CSS, and 
> JavaScript and then modify it to fit the patterns? I don't understand the 
> best way to go about it.
>

-- 
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+unsubscr...@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/4900c774-6804-4abe-96c4-a161be7a4b26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] #link_to is throwing error - ArgumentError: arguments passed to url_for can't be handled.

2015-02-18 Thread Arup Rakshit
Hi,

I have the below resource table Comment controller :

[arup@app]$ rake routes | grep comments
  commentsGET/comments(.:format)  comments#index
   POST   /comments(.:format)  comments#create
   new_comment  GET/comments/new(.:format)  comments#new
  edit_comment   GET/comments/:id/edit(.:format) comments#edit
   comment GET/comments/:id(.:format)  comments#show
   PATCH  /comments/:id(.:format)  comments#update
   PUT/comments/:id(.:format)  comments#update
   DELETE /comments/:id(.:format)  comments#destroy

Now, I am trying to figure out what I read from the guide - 
http://guides.rubyonrails.org/v4.1.8/routing.html#creating-paths-and-urls-from-objects

===
If you wanted to link to just a magazine:
For other actions, you just need to insert the action name as the first element 
of the array:...
===

I tried -

helper.link_to("Show comment", [Comment.first], method: :get)
helper.link_to("Show comment", Comment.first, method: :get)
helper.link_to("Show comment", [:show, Comment.first])
helper.link_to("Show comment", Comment.first, method: :get)

Always I'm getting the error as : ArgumentError: arguments passed to url_for 
can't be handled. Please require routes or provide your own implementation

Any idea what am I doing wrong ? I am not getting the result as guide promised. 
:-)

-- 

Regards,
Arup Rakshit

Debugging is twice as hard as writing the code in the first place. Therefore, 
if you write the code as cleverly as possible, you are, by definition, not 
smart enough to debug it.

--Brian Kernighan

-- 
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+unsubscr...@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/1429708.zPV1iYpq3S%40linux-wzza.site.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Learn Ruby on Rails before I start building my web app?

2015-02-18 Thread TTambe
If you know HTML, CSS, and JS, then you're more than ready to try RoR. Go
through a tutorial like www.railstutorial.org. I started with
https://onemonth.com/courses/one-month-rails/ and really liked that course.


On Wed, Feb 18, 2015 at 12:23 PM, Stella Buttercup <
stellabutterc...@gmail.com> wrote:

>  I am a new programmer. I know Javascript, CSS, and HTML. I've never
> written a web app. I can cobble together code for my first try, but it is
> likely that as a beginner programmer code, it can quickly become an
> unmaintainable mess. I learned that Ruby on Rails helps build applications
> using basic patterns to inform better code design. Should I learn Ruby on
> Rails before I start coding? Or do I build it with HTML, CSS, and
> JavaScript and then modify it to fit the patterns? I don't understand the
> best way to go about it.
>
> --
> 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+unsubscr...@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/bc50fd0f-2618-4a07-8e58-39b3d58ee51c%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+unsubscr...@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/CAEdg5qSOKc3oYz0VRSQ5j-vULZH4u7jo%2BEqPHC%2BNUs3b-L733Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Learn Ruby on Rails before I start building my web app?

2015-02-18 Thread Stella Buttercup
 I am a new programmer. I know Javascript, CSS, and HTML. I've never 
written a web app. I can cobble together code for my first try, but it is 
likely that as a beginner programmer code, it can quickly become an 
unmaintainable mess. I learned that Ruby on Rails helps build applications 
using basic patterns to inform better code design. Should I learn Ruby on 
Rails before I start coding? Or do I build it with HTML, CSS, and 
JavaScript and then modify it to fit the patterns? I don't understand the 
best way to go about it.

-- 
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+unsubscr...@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/bc50fd0f-2618-4a07-8e58-39b3d58ee51c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Email preview in production in rails 4

2015-02-18 Thread Harshvardhan Parihar
Did u get the solution for this issue.

On Thursday, December 11, 2014 at 9:47:29 PM UTC+5:30, Hristo Peev wrote:
>
> Hello,
>
> I am using rails 4.1.1 and ActionMailer::Preview. In development 
> environment everything is working excellent.
>
> But in production environment the preview routes are not accessible. I 
> store the previews in test/mailers/previews/
> Is is possible to enable them for production?
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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/6f2ea3d4-59fe-492e-a310-62b23aae6827%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] [JOBS] Ruby on Rails Engineer in the NYC Area

2015-02-18 Thread Social Media


Do you believe that code can be “beautiful?” Do you believe that software 
development is a team sport, and that you play it well? Do you think that 
the values stated in the Agile manifesto is obvious? If so, we are looking 
for you to join our team! 

Kubisys is an enterprise technology startup that is widely recognized as a 
leader in the DevOps space. With our growing customer success, building our 
next generation platform has become one of our top priorities. We are 
seeking a senior software engineer who will contribute to our existing 
product, iterate through short sprints and work together with our 
development team to build a world-class product. This is a great 
opportunity to join a fun, fast-paced and quickly growing company. Be a 
part of leading edge, game-changing technology.
Desired Skills and Experience
   
   - BS in Computer Science, 7+ years of development experience 
   - 2+ years of Ruby on Rails coding. 
   - Understands Test Driven Development. Routinely writes test code in 
   RoR. 
   - Familiar with git. 
   - Proficiency with web services and RESTful API’s. 
   - Great communication, interpersonal and collaboration skills. 
   - Experience with SQL (ideally MySQL). 
   - Familiar with Data Center Operations (e.g., VMWare, SAN, Networking.). 

Click here to apply on LinkedIn! 



-- 
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+unsubscr...@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/35825aad-80c3-422a-800f-320f1e5075e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Converting rails application to mobile application

2015-02-18 Thread Colin Law
On 18 February 2015 at 16:06, Puneet Agarwal
 wrote:
> Can you please elaborate this how to create json api. And will it look like
> application which is built using android studio. I am novice in apps so
> might be asking silly questions. But can you please tell me something more
> about this. I have thought 1 way using cordova in which I will transfer data
> using ajax that is using json only , are you suggesting this thing only??

You can just add
format.json do
in the respond_to block and render the json that you want.  I am sure
google will easily find loads of stuff on adding a json api to a rails
app.

As for developing android apps this is not the right list, as that is
nothing to do with rails.  In your case it just happens that the
server api is being provided by a rails app, that is of little
relevance to the mobile app.

Of course the simplest solution is just to provide pages specifically
designed for mobile devices in your rails app and view them in the
browser on the mobile device.

Colin

>
> On Wednesday, 18 February 2015 07:40:04 UTC-8, Puneet Agarwal wrote:
>>
>> Hi,
>>
>> I am having full fledged working website using rails framework. It is
>> responsive also. But now I want mobile application of the same with some
>> less features. Now I have done Rnd and found that there are 2 ways or 2
>> Platforms.
>> 1) Cordova
>> 2) Android Studio
>>
>> Now I am not able to select which will be better and how I proceed
>> converting rails application to mobile application.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@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/43579b4b-3921-45d3-8fd7-b3061624f7e9%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+unsubscr...@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%3D0gLvBO4A5UbLk1hhp7jWA8Xzx2_nTBcVsGs4yPXWatSnBqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Converting rails application to mobile application

2015-02-18 Thread Puneet Agarwal
Can you please elaborate this how to create json api. And will it look like 
application which is built using android studio. I am novice in apps so 
might be asking silly questions. But can you please tell me something more 
about this. I have thought 1 way using cordova in which I will transfer 
data using ajax that is using json only , are you suggesting this thing 
only??

On Wednesday, 18 February 2015 07:40:04 UTC-8, Puneet Agarwal wrote:
>
> Hi,
>
> I am having full fledged working website using rails framework. It is 
> responsive also. But now I want mobile application of the same with some 
> less features. Now I have done Rnd and found that there are 2 ways or 2 
> Platforms.
> 1) Cordova
> 2) Android Studio
>
> Now I am not able to select which will be better and how I proceed 
> converting rails application to mobile application. 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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/43579b4b-3921-45d3-8fd7-b3061624f7e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Converting rails application to mobile application

2015-02-18 Thread Colin Law
On 18 February 2015 at 15:49, Puneet Agarwal
 wrote:
> Yes Exactly i want to have interface in mobile also in app format with no
> changes at the server end.

So that means you do not wish to convert the rails app to a mobile
app, you just want to provide an additional interface to the rails app
that you can access from the mobile device.  Usually this would be
done by using a JSON api in the app, which you access from the mobile
app.

Colin

>
> On Wednesday, 18 February 2015 07:40:04 UTC-8, Puneet Agarwal wrote:
>>
>> Hi,
>>
>> I am having full fledged working website using rails framework. It is
>> responsive also. But now I want mobile application of the same with some
>> less features. Now I have done Rnd and found that there are 2 ways or 2
>> Platforms.
>> 1) Cordova
>> 2) Android Studio
>>
>> Now I am not able to select which will be better and how I proceed
>> converting rails application to mobile application.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@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/905f4cea-a26f-4542-9d7c-88cf3b7fddf8%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+unsubscr...@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%3D0gLvPy%3DSTNEQmQXD66iN1C_C2GNDrR0kQ5sD2dU1fPMdwxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Converting rails application to mobile application

2015-02-18 Thread Puneet Agarwal
Yes Exactly i want to have interface in mobile also in app format with no 
changes at the server end.

On Wednesday, 18 February 2015 07:40:04 UTC-8, Puneet Agarwal wrote:
>
> Hi,
>
> I am having full fledged working website using rails framework. It is 
> responsive also. But now I want mobile application of the same with some 
> less features. Now I have done Rnd and found that there are 2 ways or 2 
> Platforms.
> 1) Cordova
> 2) Android Studio
>
> Now I am not able to select which will be better and how I proceed 
> converting rails application to mobile application. 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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/905f4cea-a26f-4542-9d7c-88cf3b7fddf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Converting rails application to mobile application

2015-02-18 Thread Colin Law
On 18 February 2015 at 15:40, Puneet Agarwal
 wrote:
> Hi,
>
> I am having full fledged working website using rails framework. It is
> responsive also. But now I want mobile application of the same with some
> less features. Now I have done Rnd and found that there are 2 ways or 2
> Platforms.
> 1) Cordova
> 2) Android Studio
>
> Now I am not able to select which will be better and how I proceed
> converting rails application to mobile application.

Do you mean that you want to keep the web server doing the work, with
an app running on a mobile device interfacing with it?

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+unsubscr...@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/6240e360-5e57-4208-944c-3d76179021a4%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+unsubscr...@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%3D0gLv9o79X%3DO7dor%2BXG_LK8zfo4navKcc5aEzU7KQCdWV8YA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Converting rails application to mobile application

2015-02-18 Thread Puneet Agarwal
Hi,

I am having full fledged working website using rails framework. It is 
responsive also. But now I want mobile application of the same with some 
less features. Now I have done Rnd and found that there are 2 ways or 2 
Platforms.
1) Cordova
2) Android Studio

Now I am not able to select which will be better and how I proceed 
converting rails application to mobile application. 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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/6240e360-5e57-4208-944c-3d76179021a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Colin Law
On 18 February 2015 at 14:41, Cezinha - ASSEINFO  wrote:
> Hi!
>
> I changed my code to use Time.now instead of Time.new and now everything is
> ok.
>
> Do you know where can I check if this bugs is reported and if no... to
> report?

Probably our posts crossed, see my last email for reason why I don't
think this is a bug.

Colin

>
> Thanks.
>
> Em Wed Feb 18 2015 at 12:03:06 PM, Colin Law  escreveu:
>>
>> On 18 February 2015 at 12:23, Colin Law  wrote:
>> > On 18 February 2015 at 12:04, Cezinha - ASSEINFO 
>> > wrote:
>> >> You can find here:
>> >>
>> >> http://ruby-doc.org//core-2.2.0/Time.html
>> >>
>> >> new → time
>> >>
>> >> new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil,
>> >> utc_offset=nil) →
>> >> time
>> >>
>> >> Returns a Time object.
>> >>
>> >> It is initialized to the current system time if no argument is given.
>> >>
>> >> a = Time.new  #=> 2007-11-19 07:50:02 -0600
>> >
>> > Yes, you are right, and since that document also says that Time.now is
>> > an alias for this, and the docs for travel_to states that Time.now
>> > should get the travel_to time (have you tried Time.now in the block?)
>> > then it looks like you have found a bug.
>>
>> I think I have to retract this, since the docs for travel_to state
>> that Time.now and Time.current are stubbed then it means that Time.now
>> is no longer an alias for Time.new(), so there is no guarantee that
>> Time.new() will respect travel_to.
>>
>> Colin
>>
>> >
>> > Colin
>> >
>> >>
>> >> Thanks.
>> >>
>> >>
>> >>
>> >> Em Wed Feb 18 2015 at 9:09:31 AM, Colin Law 
>> >> escreveu:
>> >>>
>> >>> On 18 February 2015 at 11:03, Cezinha - ASSEINFO
>> >>> 
>> >>> wrote:
>> >>> > Bingo!
>> >>> >
>> >>> > It's returning the "travel_to" time.
>> >>> >
>> >>> > Do you know why?
>> >>>
>> >>> Can you point to some documentation that says that Time.new()
>> >>> initialises to current?  I could not find any.
>> >>>
>> >>> Colin
>> >>>
>> >>> >
>> >>> > Thanks A LOT!!!
>> >>> >
>> >>> > Em Wed Feb 18 2015 at 7:20:47 AM, Colin Law 
>> >>> > escreveu:
>> >>> >>
>> >>> >> On 18 February 2015 at 01:03, Cezinha Anjos
>> >>> >> 
>> >>> >> wrote:
>> >>> >> > Hi!
>> >>> >> >
>> >>> >> > I have two projects running Rails 4.2 and using travel_to from
>> >>> >> > ActiveSupport::Testing::TimeHelpers.
>> >>> >> >
>> >>> >> > In one project everything is working perfectly. But in the second
>> >>> >> > one,
>> >>> >> > my
>> >>> >> > specs are running with the current date/time instead of using
>> >>> >> > travel_to.
>> >>> >> > Here is one example:
>> >>> >> >
>> >>> >> >   it "is only a travel_to test" do
>> >>> >> > travel_to Time.new(2012, 1, 1, 1, 1, 1) do
>> >>> >> >   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
>> >>> >> > end
>> >>> >> >   end
>> >>> >> >
>> >>> >> > I've already set the rails_helper.rb with:
>> >>> >> >
>> >>> >> > RSpec.configure do |config|
>> >>> >> >   ...
>> >>> >> >   config.include ActiveSupport::Testing::TimeHelpers
>> >>> >> > end
>> >>> >> >
>> >>> >> > Does anyone know what's going on?
>> >>> >>
>> >>> >> What do Time.current and Time.now give you inside the block?
>> >>> >>
>> >>> >> 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+unsubscr...@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%3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
>> >>> >> For more options, visit https://groups.google.com/d/optout.
>> >>> >
>> >>> > --
>> >>> > You received this message because you are subscribed to the Google
>> >>> > Groups
>> >>> > "Ruby on Rails: Talk" group.
>> >>> > To unsubscribe from this group and stop receiving emails from it,
>> >>> > send
>> >>> > an
>> >>> > email to rubyonrails-talk+unsubscr...@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/CACDeCpshotmnGntZc5g51bt2g%2BKcV6r_0%3DwV%2B2vJpAiy1Yz7zQ%40mail.gmail.com.
>> >>> >
>> >>> > For more options, visit https://groups.google.com/d/optout.
>> >>>
>> >>> --
>> >>> You received this message because you are subscribed to the Google
>> >>> Groups
>> >>> "Ruby on Rails: Talk" group.
>> >>> To unsubscribe from this group and stop receiving emails from it, send
>> >>> an
>> >>> email to rubyonrails-talk+unsubscr...@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

Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Cezinha - ASSEINFO
Hi!

I changed my code to use Time.now instead of Time.new and now everything is
ok.

Do you know where can I check if this bugs is reported and if no... to
report?

Thanks.

Em Wed Feb 18 2015 at 12:03:06 PM, Colin Law  escreveu:

> On 18 February 2015 at 12:23, Colin Law  wrote:
> > On 18 February 2015 at 12:04, Cezinha - ASSEINFO 
> wrote:
> >> You can find here:
> >>
> >> http://ruby-doc.org//core-2.2.0/Time.html
> >>
> >> new → time
> >>
> >> new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil,
> utc_offset=nil) →
> >> time
> >>
> >> Returns a Time object.
> >>
> >> It is initialized to the current system time if no argument is given.
> >>
> >> a = Time.new  #=> 2007-11-19 07:50:02 -0600
> >
> > Yes, you are right, and since that document also says that Time.now is
> > an alias for this, and the docs for travel_to states that Time.now
> > should get the travel_to time (have you tried Time.now in the block?)
> > then it looks like you have found a bug.
>
> I think I have to retract this, since the docs for travel_to state
> that Time.now and Time.current are stubbed then it means that Time.now
> is no longer an alias for Time.new(), so there is no guarantee that
> Time.new() will respect travel_to.
>
> Colin
>
> >
> > Colin
> >
> >>
> >> Thanks.
> >>
> >>
> >>
> >> Em Wed Feb 18 2015 at 9:09:31 AM, Colin Law 
> escreveu:
> >>>
> >>> On 18 February 2015 at 11:03, Cezinha - ASSEINFO <
> ce...@asseinfo.com.br>
> >>> wrote:
> >>> > Bingo!
> >>> >
> >>> > It's returning the "travel_to" time.
> >>> >
> >>> > Do you know why?
> >>>
> >>> Can you point to some documentation that says that Time.new()
> >>> initialises to current?  I could not find any.
> >>>
> >>> Colin
> >>>
> >>> >
> >>> > Thanks A LOT!!!
> >>> >
> >>> > Em Wed Feb 18 2015 at 7:20:47 AM, Colin Law 
> >>> > escreveu:
> >>> >>
> >>> >> On 18 February 2015 at 01:03, Cezinha Anjos <
> cezinha.an...@gmail.com>
> >>> >> wrote:
> >>> >> > Hi!
> >>> >> >
> >>> >> > I have two projects running Rails 4.2 and using travel_to from
> >>> >> > ActiveSupport::Testing::TimeHelpers.
> >>> >> >
> >>> >> > In one project everything is working perfectly. But in the second
> >>> >> > one,
> >>> >> > my
> >>> >> > specs are running with the current date/time instead of using
> >>> >> > travel_to.
> >>> >> > Here is one example:
> >>> >> >
> >>> >> >   it "is only a travel_to test" do
> >>> >> > travel_to Time.new(2012, 1, 1, 1, 1, 1) do
> >>> >> >   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
> >>> >> > end
> >>> >> >   end
> >>> >> >
> >>> >> > I've already set the rails_helper.rb with:
> >>> >> >
> >>> >> > RSpec.configure do |config|
> >>> >> >   ...
> >>> >> >   config.include ActiveSupport::Testing::TimeHelpers
> >>> >> > end
> >>> >> >
> >>> >> > Does anyone know what's going on?
> >>> >>
> >>> >> What do Time.current and Time.now give you inside the block?
> >>> >>
> >>> >> 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+unsubscr...@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%
> 3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
> >>> >> For more options, visit https://groups.google.com/d/optout.
> >>> >
> >>> > --
> >>> > You received this message because you are subscribed to the Google
> >>> > Groups
> >>> > "Ruby on Rails: Talk" group.
> >>> > To unsubscribe from this group and stop receiving emails from it,
> send
> >>> > an
> >>> > email to rubyonrails-talk+unsubscr...@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/
> CACDeCpshotmnGntZc5g51bt2g%2BKcV6r_0%3DwV%2B2vJpAiy1Yz7zQ%40mail.gmail.com
> .
> >>> >
> >>> > For more options, visit https://groups.google.com/d/optout.
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> Groups
> >>> "Ruby on Rails: Talk" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send
> an
> >>> email to rubyonrails-talk+unsubscr...@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%
> 3D0gLvSh%2BZDxH-Eq_Kd-C37EgOmDLHLq04gg-uLPf4StXQ1tg%40mail.gmail.com.
> >>> For more options, visit https://groups.google.com/d/optout.
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Ruby on Rails: Talk" group.
> >> To unsubscribe from this group an

Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Colin Law
On 18 February 2015 at 12:23, Colin Law  wrote:
> On 18 February 2015 at 12:04, Cezinha - ASSEINFO  
> wrote:
>> You can find here:
>>
>> http://ruby-doc.org//core-2.2.0/Time.html
>>
>> new → time
>>
>> new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil, utc_offset=nil) →
>> time
>>
>> Returns a Time object.
>>
>> It is initialized to the current system time if no argument is given.
>>
>> a = Time.new  #=> 2007-11-19 07:50:02 -0600
>
> Yes, you are right, and since that document also says that Time.now is
> an alias for this, and the docs for travel_to states that Time.now
> should get the travel_to time (have you tried Time.now in the block?)
> then it looks like you have found a bug.

I think I have to retract this, since the docs for travel_to state
that Time.now and Time.current are stubbed then it means that Time.now
is no longer an alias for Time.new(), so there is no guarantee that
Time.new() will respect travel_to.

Colin

>
> Colin
>
>>
>> Thanks.
>>
>>
>>
>> Em Wed Feb 18 2015 at 9:09:31 AM, Colin Law  escreveu:
>>>
>>> On 18 February 2015 at 11:03, Cezinha - ASSEINFO 
>>> wrote:
>>> > Bingo!
>>> >
>>> > It's returning the "travel_to" time.
>>> >
>>> > Do you know why?
>>>
>>> Can you point to some documentation that says that Time.new()
>>> initialises to current?  I could not find any.
>>>
>>> Colin
>>>
>>> >
>>> > Thanks A LOT!!!
>>> >
>>> > Em Wed Feb 18 2015 at 7:20:47 AM, Colin Law 
>>> > escreveu:
>>> >>
>>> >> On 18 February 2015 at 01:03, Cezinha Anjos 
>>> >> wrote:
>>> >> > Hi!
>>> >> >
>>> >> > I have two projects running Rails 4.2 and using travel_to from
>>> >> > ActiveSupport::Testing::TimeHelpers.
>>> >> >
>>> >> > In one project everything is working perfectly. But in the second
>>> >> > one,
>>> >> > my
>>> >> > specs are running with the current date/time instead of using
>>> >> > travel_to.
>>> >> > Here is one example:
>>> >> >
>>> >> >   it "is only a travel_to test" do
>>> >> > travel_to Time.new(2012, 1, 1, 1, 1, 1) do
>>> >> >   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
>>> >> > end
>>> >> >   end
>>> >> >
>>> >> > I've already set the rails_helper.rb with:
>>> >> >
>>> >> > RSpec.configure do |config|
>>> >> >   ...
>>> >> >   config.include ActiveSupport::Testing::TimeHelpers
>>> >> > end
>>> >> >
>>> >> > Does anyone know what's going on?
>>> >>
>>> >> What do Time.current and Time.now give you inside the block?
>>> >>
>>> >> 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+unsubscr...@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%3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
>>> >> For more options, visit https://groups.google.com/d/optout.
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "Ruby on Rails: Talk" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an
>>> > email to rubyonrails-talk+unsubscr...@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/CACDeCpshotmnGntZc5g51bt2g%2BKcV6r_0%3DwV%2B2vJpAiy1Yz7zQ%40mail.gmail.com.
>>> >
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Ruby on Rails: Talk" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to rubyonrails-talk+unsubscr...@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%3D0gLvSh%2BZDxH-Eq_Kd-C37EgOmDLHLq04gg-uLPf4StXQ1tg%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to rubyonrails-talk+unsubscr...@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/CACDeCpuQ%3DGJ18iaxQCBhO9pdAp1ZAU%3DgPEzP%2BBbtAoFjBWL98Q%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails 

[Rails] welcome mailer not working properly,mail is going every time a user logs in to site

2015-02-18 Thread Sailatha Kashamoni
welcome mail is going every time a user logs in to site,i only want it to 
go once when user signed up

app/controllers/user_mailer.rb--

class UserMailer < ActionMailer::Base
  default from: "myemai...@gmail.com"
  def registration_confirmation(user)
   
UserMailer.registration_confirmation(@user).deliver
  end
end 

app/mailers/welcome_mailer.rb--

class WelcomeMailer < ActionMailer::Base
  default from: " Impact Institute (alert) "
  
  def welcome_confirmation(email)
@email = email
mail(:to => "#{email}", :subject => "Welcome to 
www.impactinstitute.org!")
  end
end

-- 
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+unsubscr...@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/0ff1886b-0969-47da-b291-44d6e792100a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] loging out of site if navigatinhg to other pages in ruby on rails app

2015-02-18 Thread Sailatha Kashamoni
I have an issue when i am loging in to site after clicking on other menu 
tabs it is automatically loging out and if i wait for few minutes refresh 
and then login tabs are working fine.If i logout and login again and i 
click on other tabs geting loged out. I am not understanding where i need 
to check the code.

class SessionsController < Devise::SessionsController
  # POST /resource/sign_in
  def create
respond_to do |format|
  format.json do
self.resource = warden.authenticate!(auth_options)
sign_in(resource_name, resource)
return render :json => resource
  end
  format.html do
super
  end
end
  end  
end

-- 
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+unsubscr...@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/a004de17-99f1-45ea-a691-92e63b8fc473%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Hassan Schroeder
On Tue, Feb 17, 2015 at 5:03 PM, Cezinha Anjos  wrote:

> I have two projects running Rails 4.2 and using travel_to from
> ActiveSupport::Testing::TimeHelpers.

>   it "is only a travel_to test" do
> travel_to Time.new(2012, 1, 1, 1, 1, 1) do
>   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
> end
>   end

>From the doc for `travel_to` --
Changes current time to the given time by stubbing Time.now and
Date.today to return the time or date passed into this method.

If you change your test to `expect(Time.now).to ...` it will pass.

HTH,
-- 
Hassan Schroeder  hassan.schroe...@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+unsubscr...@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/CACmC4yB8sEWJGOPaR3%3DgJvFBe1_DMDRR9c8fcB%2Bs_ny8D-g8rA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Colin Law
On 18 February 2015 at 12:04, Cezinha - ASSEINFO  wrote:
> You can find here:
>
> http://ruby-doc.org//core-2.2.0/Time.html
>
> new → time
>
> new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil, utc_offset=nil) →
> time
>
> Returns a Time object.
>
> It is initialized to the current system time if no argument is given.
>
> a = Time.new  #=> 2007-11-19 07:50:02 -0600

Yes, you are right, and since that document also says that Time.now is
an alias for this, and the docs for travel_to states that Time.now
should get the travel_to time (have you tried Time.now in the block?)
then it looks like you have found a bug.

Colin

>
> Thanks.
>
>
>
> Em Wed Feb 18 2015 at 9:09:31 AM, Colin Law  escreveu:
>>
>> On 18 February 2015 at 11:03, Cezinha - ASSEINFO 
>> wrote:
>> > Bingo!
>> >
>> > It's returning the "travel_to" time.
>> >
>> > Do you know why?
>>
>> Can you point to some documentation that says that Time.new()
>> initialises to current?  I could not find any.
>>
>> Colin
>>
>> >
>> > Thanks A LOT!!!
>> >
>> > Em Wed Feb 18 2015 at 7:20:47 AM, Colin Law 
>> > escreveu:
>> >>
>> >> On 18 February 2015 at 01:03, Cezinha Anjos 
>> >> wrote:
>> >> > Hi!
>> >> >
>> >> > I have two projects running Rails 4.2 and using travel_to from
>> >> > ActiveSupport::Testing::TimeHelpers.
>> >> >
>> >> > In one project everything is working perfectly. But in the second
>> >> > one,
>> >> > my
>> >> > specs are running with the current date/time instead of using
>> >> > travel_to.
>> >> > Here is one example:
>> >> >
>> >> >   it "is only a travel_to test" do
>> >> > travel_to Time.new(2012, 1, 1, 1, 1, 1) do
>> >> >   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
>> >> > end
>> >> >   end
>> >> >
>> >> > I've already set the rails_helper.rb with:
>> >> >
>> >> > RSpec.configure do |config|
>> >> >   ...
>> >> >   config.include ActiveSupport::Testing::TimeHelpers
>> >> > end
>> >> >
>> >> > Does anyone know what's going on?
>> >>
>> >> What do Time.current and Time.now give you inside the block?
>> >>
>> >> 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+unsubscr...@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%3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Ruby on Rails: Talk" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to rubyonrails-talk+unsubscr...@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/CACDeCpshotmnGntZc5g51bt2g%2BKcV6r_0%3DwV%2B2vJpAiy1Yz7zQ%40mail.gmail.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to rubyonrails-talk+unsubscr...@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%3D0gLvSh%2BZDxH-Eq_Kd-C37EgOmDLHLq04gg-uLPf4StXQ1tg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@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/CACDeCpuQ%3DGJ18iaxQCBhO9pdAp1ZAU%3DgPEzP%2BBbtAoFjBWL98Q%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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%3D0gLv8NJpp_zL_ZzZESiAvGhJW7xNzbvnF8PHnnQnQWeXFtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Cezinha - ASSEINFO
You can find here:

http://ruby-doc.org//core-2.2.0/Time.html

*new → time*

*new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil, utc_offset=nil)
→ time*

Returns a Time  object.

It is initialized to the current system time if no argument is given.

a = Time.new  *#=> 2007-11-19 07:50:02 -0600*

Thanks.


Em Wed Feb 18 2015 at 9:09:31 AM, Colin Law  escreveu:

> On 18 February 2015 at 11:03, Cezinha - ASSEINFO 
> wrote:
> > Bingo!
> >
> > It's returning the "travel_to" time.
> >
> > Do you know why?
>
> Can you point to some documentation that says that Time.new()
> initialises to current?  I could not find any.
>
> Colin
>
> >
> > Thanks A LOT!!!
> >
> > Em Wed Feb 18 2015 at 7:20:47 AM, Colin Law 
> escreveu:
> >>
> >> On 18 February 2015 at 01:03, Cezinha Anjos 
> >> wrote:
> >> > Hi!
> >> >
> >> > I have two projects running Rails 4.2 and using travel_to from
> >> > ActiveSupport::Testing::TimeHelpers.
> >> >
> >> > In one project everything is working perfectly. But in the second one,
> >> > my
> >> > specs are running with the current date/time instead of using
> travel_to.
> >> > Here is one example:
> >> >
> >> >   it "is only a travel_to test" do
> >> > travel_to Time.new(2012, 1, 1, 1, 1, 1) do
> >> >   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
> >> > end
> >> >   end
> >> >
> >> > I've already set the rails_helper.rb with:
> >> >
> >> > RSpec.configure do |config|
> >> >   ...
> >> >   config.include ActiveSupport::Testing::TimeHelpers
> >> > end
> >> >
> >> > Does anyone know what's going on?
> >>
> >> What do Time.current and Time.now give you inside the block?
> >>
> >> 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+unsubscr...@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%
> 3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ruby on Rails: Talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to rubyonrails-talk+unsubscr...@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/
> CACDeCpshotmnGntZc5g51bt2g%2BKcV6r_0%3DwV%2B2vJpAiy1Yz7zQ%40mail.gmail.com
> .
> >
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@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%3D0gLvSh%2BZDxH-Eq_Kd-
> C37EgOmDLHLq04gg-uLPf4StXQ1tg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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/CACDeCpuQ%3DGJ18iaxQCBhO9pdAp1ZAU%3DgPEzP%2BBbtAoFjBWL98Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Colin Law
On 18 February 2015 at 11:03, Cezinha - ASSEINFO  wrote:
> Bingo!
>
> It's returning the "travel_to" time.
>
> Do you know why?

Can you point to some documentation that says that Time.new()
initialises to current?  I could not find any.

Colin

>
> Thanks A LOT!!!
>
> Em Wed Feb 18 2015 at 7:20:47 AM, Colin Law  escreveu:
>>
>> On 18 February 2015 at 01:03, Cezinha Anjos 
>> wrote:
>> > Hi!
>> >
>> > I have two projects running Rails 4.2 and using travel_to from
>> > ActiveSupport::Testing::TimeHelpers.
>> >
>> > In one project everything is working perfectly. But in the second one,
>> > my
>> > specs are running with the current date/time instead of using travel_to.
>> > Here is one example:
>> >
>> >   it "is only a travel_to test" do
>> > travel_to Time.new(2012, 1, 1, 1, 1, 1) do
>> >   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
>> > end
>> >   end
>> >
>> > I've already set the rails_helper.rb with:
>> >
>> > RSpec.configure do |config|
>> >   ...
>> >   config.include ActiveSupport::Testing::TimeHelpers
>> > end
>> >
>> > Does anyone know what's going on?
>>
>> What do Time.current and Time.now give you inside the block?
>>
>> 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+unsubscr...@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%3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@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/CACDeCpshotmnGntZc5g51bt2g%2BKcV6r_0%3DwV%2B2vJpAiy1Yz7zQ%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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%3D0gLvSh%2BZDxH-Eq_Kd-C37EgOmDLHLq04gg-uLPf4StXQ1tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Cezinha - ASSEINFO
Bingo!

It's returning the "travel_to" time.

Do you know why?

Thanks A LOT!!!

Em Wed Feb 18 2015 at 7:20:47 AM, Colin Law  escreveu:

> On 18 February 2015 at 01:03, Cezinha Anjos 
> wrote:
> > Hi!
> >
> > I have two projects running Rails 4.2 and using travel_to from
> > ActiveSupport::Testing::TimeHelpers.
> >
> > In one project everything is working perfectly. But in the second one, my
> > specs are running with the current date/time instead of using travel_to.
> > Here is one example:
> >
> >   it "is only a travel_to test" do
> > travel_to Time.new(2012, 1, 1, 1, 1, 1) do
> >   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
> > end
> >   end
> >
> > I've already set the rails_helper.rb with:
> >
> > RSpec.configure do |config|
> >   ...
> >   config.include ActiveSupport::Testing::TimeHelpers
> > end
> >
> > Does anyone know what's going on?
>
> What do Time.current and Time.now give you inside the block?
>
> 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+unsubscr...@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%3D0gLvHWzjwnoEirh09pBdTfCUA64O
> poPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@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/CACDeCpshotmnGntZc5g51bt2g%2BKcV6r_0%3DwV%2B2vJpAiy1Yz7zQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Rails 4.2 & travel_to is not working

2015-02-18 Thread Colin Law
On 18 February 2015 at 01:03, Cezinha Anjos  wrote:
> Hi!
>
> I have two projects running Rails 4.2 and using travel_to from
> ActiveSupport::Testing::TimeHelpers.
>
> In one project everything is working perfectly. But in the second one, my
> specs are running with the current date/time instead of using travel_to.
> Here is one example:
>
>   it "is only a travel_to test" do
> travel_to Time.new(2012, 1, 1, 1, 1, 1) do
>   expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1)
> end
>   end
>
> I've already set the rails_helper.rb with:
>
> RSpec.configure do |config|
>   ...
>   config.include ActiveSupport::Testing::TimeHelpers
> end
>
> Does anyone know what's going on?

What do Time.current and Time.now give you inside the block?

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+unsubscr...@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%3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.