Hi,
i am working on rails 4 application,i am trying to integrate linked-in in my application.i am followed below link steps,but i can't fetch user feeds(updates & shares),i can fetch only user profile informations.how can i get all informations.please help me
Reference : https://github.com/emorikawa/linkedin-oauth2
this is my scope in omniauth.rb
OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
provider :linkedin, SOCIAL_CONFIG['linkedin_client_id'], SOCIAL_CONFIG['linkedin_client_secret'], scope: ['r_fullprofile', 'r_emailaddress','r_network','w_share'], fields: ['id', 'first-name', 'last-name', 'location', 'picture-url', 'public-profile-url']
end
ActionView::Template::Error (PG::UndefinedColumn: ERROR: column "startdate" does not exist
2017-02-01T03:51:33.326023+00:00 app[web.1]: LINE 1: SELECT "products".* FROM "products" ORDER BY Startdate ASC...
2017-02-01T03:51:33.326023+00:00 app[web.1]: ^
2017-02-01T03:51:33.326024+00:00 app[web.1]: HINT: Perhaps you meant to reference the column "products.Startdate".
Startdate is a column in my database table, I don't know where it coming up with 'startdate' does not exist? I don't have that in any of my references.
Thanks,
Joe
On Tuesday, January 31, 2017 at 10:24:13 PM UTC-5, Joe Guerra wrote:
This is driving me crazy. I have my web app working great in development, then I commit and push it to Github and heroku automatically deploys my app.Unfortunately, it doesn't quite work out the same as the development.Pages aren't being found on production, but they are there in development and they are on my github repo.Heroku logs are not very useful either. :(Any suggestions?Thanks,Joe
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a99a74c0-76b7-4b5c-a67d-9005a77d852d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Tuesday, January 31, 2017 at 1:49:20 AM UTC-5, Bill Felton wrote:
Is it a boolean column?We wind up setting @user = current_user, and then checkingif @user.admin#current_user.admin should work just as well if you don't need to hang on to the actual signed in user.…endOtherwise,@user.<column_name> == "admin" #(or whatever you use)cheers,BillOn Jan 30, 2017, at 4:48 PM, Joe Guerra <jgu...@jginfosys.com> wrote:I know there is a current_user method for devise, but how do you check if the user is admin? (I've got a user flagged as admin).I have a admin menu that I'd like to enable / disable when admin is logged in.Thanks,Joe--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .e4ec59a4-4bb5-4e0f-9490- d659d6350a47%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/a07b6d98-5dd9-4b88-9aea-9557eff28667%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/87fd3a2c-bf97-474a-a7e7-dcb647fe39a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Does any know if there is a quick method to doing this?--I'd like to print out my project on paper, and make some notes.Thanks,Joe
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1267007e-4c13-449b-b369-b7d094f5c84d%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_t8jY2oue1tSBsAzZbdJ%2BJVPckh6mLD5APSHik5cikMO1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Hey Tushar,There are a lot of great resources online for creating APIs in Rails 5 (with its new API-only mode).One of my favorites is called Building the Perfect Rails 5 API Only App by Kam Low (which I wrote about).Another that just caught my eye was this one called Best Practices for Designing a Pragmatic RESTful API by Vinay Sahni. It isn't specific to Rails 5, but talks about API best practices and recommendations in general. Very comprehensive.Hope those help!
On Saturday, January 28, 2017 at 9:27:03 AM UTC-5, Tushar Garg wrote:Hi All,
I am new to rails.
I want to write restful api's in rails. I start following the "API on Rails" book.
By following that book, I come to know that there are lot of things are depreciated in rspec, I am getting bulk of error and all things are blown.
Please anyone provide me step by step tutorial for writing Rest APi in rails 5
Thanks
Tushar Garg
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/ .XHDZ0IzzWyA/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/ .cc1af4a4-3a54-46f6-8a51- 7845e192facc%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/CAK6MfSd_gOWQ1Gwb3MZZEF7EQAtnYFVUizCBWuFHw%2B9dK5mJjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Saturday, January 28, 2017 at 9:27:03 AM UTC-5, Tushar Garg wrote:
Hi All,
I am new to rails.
I want to write restful api's in rails. I start following the "API on Rails" book.
By following that book, I come to know that there are lot of things are depreciated in rspec, I am getting bulk of error and all things are blown.
Please anyone provide me step by step tutorial for writing Rest APi in rails 5
Thanks
Tushar Garg
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/cc1af4a4-3a54-46f6-8a51-7845e192facc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Monday, January 30, 2017 at 4:48:21 PM UTC-5, Joe Guerra wrote:
I know there is a current_user method for devise, but how do you check if the user is admin? (I've got a user flagged as admin).I have a admin menu that I'd like to enable / disable when admin is logged in.Thanks,Joe
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/863a92ed-a4b7-4644-89e3-e8ef077d37b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is it a boolean column?
On Jan 30, 2017, at 4:48 PM, Joe Guerra <jguerra@jginfosys.com> wrote:I know there is a current_user method for devise, but how do you check if the user is admin? (I've got a user flagged as admin).I have a admin menu that I'd like to enable / disable when admin is logged in.Thanks,Joe--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e4ec59a4-4bb5-4e0f-9490-d659d6350a47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 30 January 2017 at 21:48, Joe Guerra <jguerra@jginfosys.com> wrote:
> I know there is a current_user method for devise, but how do you check if
> the user is admin? (I've got a user flagged as admin).
Do you mean that you have a column in users table named admin which is
true or false? if so then just test current_user.admin
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%3D0gLtOR51yPy8BjfdNQsxPJUkwww%3DhWRTDjN1O2axeS020Aw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e4ec59a4-4bb5-4e0f-9490-d659d6350a47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm not aware of one. Do you want all the code or just the file names and hierarchies?
On Jan 30, 2017, at 4:31 PM, Joe Guerra <jguerra@jginfosys.com> wrote:Does any know if there is a quick method to doing this?I'd like to print out my project on paper, and make some notes.Thanks,Joe--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1267007e-4c13-449b-b369-b7d094f5c84d%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/1267007e-4c13-449b-b369-b7d094f5c84d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Sunday, January 29, 2017 at 10:01:49 PM UTC-5, j...@room118solutions.com wrote:
ActiveRecord will handle converting a Time into something your database understands, so you don't need to worry about that. You can also write the where clause manually like you did, or you can use arel, which would be my preference. You can also chain .where()'s, since they just return ActiveRecord::Relations and don't actually execute until they need to. Here's how you could rewrite your code:
@products = category.products.where( 'draft' => false, 'active' => true, 'funded' => false).where(Product.arel_table [:enddate].gt(Time.now))
I would personally define that as a scope on the Product model:
scope :not_expired, -> { arel_table[:enddate].gt(Time.now ) }
And then your code could become:
@products = category.products.not_expired.where ( 'draft' => false, 'active' => true, 'funded' => false)I would also probably create scopes for all of those other conditions, or maybe wrap them into a single scope if you can produce a term that accurately describes products that are in that exact state.
On Sunday, January 29, 2017 at 1:29:03 PM UTC-5, Joe Guerra wrote:I'm trying to figure out how to compare my enddate > Time.now in my where clause.enddate is a date field, I'm just trying to only display products that haven't expired (by the date field).I've tried...require 'time'products.where(['enddate > ?', Time.now])
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/8320c7d2-c004-4d87-803a-e40dc8f5bcfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@products = category.products.where( 'draft' => false, 'active' => true, 'funded' => false).where(Product.arel_table[:enddate].gt(Time.now))
I would personally define that as a scope on the Product model:
scope :not_expired, -> { arel_table[:enddate].gt(Time.now) }
And then your code could become:
@products = category.products.not_expired.where( 'draft' => false, 'active' => true, 'funded' => false)
On Sunday, January 29, 2017 at 1:29:03 PM UTC-5, Joe Guerra wrote:
I'm trying to figure out how to compare my enddate > Time.now in my where clause.enddate is a date field, I'm just trying to only display products that haven't expired (by the date field).I've tried...require 'time'products.where(['enddate > ?', Time.now])
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/3b66a09b-e6b6-479b-9598-9811e2eab43f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Sunday, January 29, 2017 at 1:29:03 PM UTC-5, Joe Guerra wrote:
I'm trying to figure out how to compare my enddate > Time.now in my where clause.enddate is a date field, I'm just trying to only display products that haven't expired (by the date field).I've tried...require 'time'products.where(['enddate > ?', Time.now])
require 'time'
todaydate = Time.new
# set 'todaydate' equal to the current date/time.
todaydate = todaydate.year.to_s + "-" + todaydate.month.to_s + "-" + todaydate.day.to_s
@title = @category.name
@products = @category.products.where( 'draft' => false, 'active' => true, 'funded' => false)
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/58c17ab3-a88e-49ee-8c90-687e6c53ec4e%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/85bbf24d-693d-46c2-a9c8-a4a0ba81f5cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Sat, Jan 28, 2017 at 11:44 PM, Tushar Garg
<tushar.garg@daffodilsw.com> wrote:
> Those errors were related testing. Becoz lot of things in Rspec are
> depriciated, when I remove Rspec and testing part from it, then its working
> fine.
But "removing testing" to make it "work" is an extremely bad habit
to get into.
If some methods shown in the old tutorial are deprecated, write
your tests to use current ones. You will never regret knowing how
to write good tests :-)
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yBe_REmbWF_BUsF5uXStKgLu7_3b-wite52hN1p1njY-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Those errors were related testing. Becoz lot of things in Rspec are depriciated, when I remove Rspec and testing part from it, then its working fine. I follow the given tutorial and the concept of Api is clear and I am able to write api in rails5.
https://www.simplify.ba/
On Saturday, January 28, 2017 at 9:43:14 PM UTC+5:30, Hassan Schroeder wrote:
On Sat, Jan 28, 2017 at 5:11 AM, Tushar Garg <tusha...@daffodilsw.com> wrote:
> I am new to rails.
> I want to write restful api's in rails. I start following the "API on Rails"
> book.
> By following that book, I come to know that there are lot of things are
> depreciated in rspec,
I would hope this book tells you what versions of gems it was using!
If so you can specify those in your Gemfile and things should work.
However, if the Rails version in question is no longer supported, then
you're better off finding a current tutorial, API-specific or not.
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0354952b-6526-4c05-92d3-78af0d77790d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Saturday, January 28, 2017 at 7:57:03 PM UTC+5:30, Tushar Garg wrote:
Hi All,
I am new to rails.
I want to write restful api's in rails. I start following the "API on Rails" book.
By following that book, I come to know that there are lot of things are depreciated in rspec, I am getting bulk of error and all things are blown.
Please anyone provide me step by step tutorial for writing Rest APi in rails 5
Thanks
Tushar Garg
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/3a03e560-a980-4020-b79f-f3a5fe3af70d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Those errors were related testing. Becoz lot of things in Rspec are depriciated, when I remove Rspec and testing part from it, then its working fine. I follow the given tutorial and the concept of Api is clear and I am able to write api in rails5.
https://www.simplify.ba/articles/2016/06/18/creating-rails5-api-only-application-following-jsonapi-specification/
On Saturday, January 28, 2017 at 9:43:14 PM UTC+5:30, Hassan Schroeder wrote:
On Sat, Jan 28, 2017 at 5:11 AM, Tushar Garg <tusha...@daffodilsw.com> wrote:
> I am new to rails.
> I want to write restful api's in rails. I start following the "API on Rails"
> book.
> By following that book, I come to know that there are lot of things are
> depreciated in rspec,
I would hope this book tells you what versions of gems it was using!
If so you can specify those in your Gemfile and things should work.
However, if the Rails version in question is no longer supported, then
you're better off finding a current tutorial, API-specific or not.
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/033dc1b9-c2f3-4310-b223-11bf62563ab0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Sat, Jan 28, 2017 at 5:11 AM, Tushar Garg <tushar.garg@daffodilsw.com> wrote:
> I am new to rails.
> I want to write restful api's in rails. I start following the "API on Rails"
> book.
> By following that book, I come to know that there are lot of things are
> depreciated in rspec,
I would hope this book tells you what versions of gems it was using!
If so you can specify those in your Gemfile and things should work.
However, if the Rails version in question is no longer supported, then
you're better off finding a current tutorial, API-specific or not.
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAP%2BaAsA%2Bd5SJRM8mSAW846FXNx343bWpPrhvCZLbF6kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi All,--
I am new to rails.
I want to write restful api's in rails. I start following the "API on Rails" book.
By following that book, I come to know that there are lot of things are depreciated in rspec, I am getting bulk of error and all things are blown.
Please anyone provide me step by step tutorial for writing Rest APi in rails 5
Thanks
Tushar Garg
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/ .b984b043-63eb-4524-bd75- 122292f4da9f%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/CAPmpWece77h9wGFVjqAiOep%2BuROhNvXtdzySw0ZxrPdN%2BRYm8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
I am new to rails.
I want to write restful api's in rails. I start following the "API on Rails" book.
By following that book, I come to know that there are lot of things are depreciated in rspec, I am getting bulk of error and all things are blown.
Please anyone provide me step by step tutorial for writing Rest APi in rails 5
Thanks
Tushar Garg
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/b984b043-63eb-4524-bd75-122292f4da9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 27 January 2017 at 23:44, fugee ohu <fugee279@gmail.com> wrote:
> there's posts on a users page and they're commentable, when a user adds a
> comment for a post on the page, i should redraw the page or modify the dom
> using js
It is up to you. There is no best way, it depends on the how you want
the site to behave.
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%3D0gLt2derhyV7gEg77jkwnen57MdB13eWthB0DDxEx295r3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Programmer
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/ace56579-2521-450e-b685-70e9fad10366%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/900d8dab-fc0d-469e-901b-882220bdeeff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I make sure that my rbenv-general Docker images include the latest versions of Ruby and Rails and the versions currently used in Rails Tutorial.
In my opinion, the main reason for having Ruby on Rails directly in the host OS is to be on the same page as teammates who rely on this setup. Because it takes hours of babysitting processes to set this up and because you can't reset this development environment willy-nilly (as you can under the Docker way), I will NOT rely on Ruby on Rails in the host OS as my primary setup.
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/6d6c2341-45c0-40f3-b458-e1afa748f77b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Check out Version 2 of my gem GenericApp https://github.com/jhsu802701/generic_app) for creating a new Rails app. No other Rails template app is this comprehensive.
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/8380aa64-ea84-4eb4-bd5a-8c400deeb538%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Don't use default_locale
In ApplcationController do something like
before_filter :set_user_locale
def set_user_locale
I18n.locale = params[:locale] if params[:locale]
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+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/ .97ba7e3c-6b93-45bc-9161- 13262e1233fd%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BfXU%2B2HRZuBnPE0KV1XmNhU0X52Ogp%3DueNQ3cqPhG5_AOVoqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Don't use default_locale
In ApplcationController do something like
before_filter :set_user_locale
def set_user_locale
I18n.locale = params[:locale] if params[:locale]
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+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/97ba7e3c-6b93-45bc-9161-13262e1233fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Paramnoor Singh
On Wednesday, January 25, 2017 at 5:30:55 PM UTC+5:30, Paramnoor Singh wrote:
Problem: I have use the net/http code for uploading the '.doc', '.docx', '.pdf' and images files on dropbox. But I getting the issues like:
1.invalid byte sequence in UTF 8
2. Now while the file is uploading but it not uploading the content and even it uploading as a corrupt file.
Below I writing my code to upload the file on dropbox. Please help me.
Code:
uri = URI.parse("https://content.dropboxapi.com/2/files/upload ")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/octet-stream"
request["Authorization"] = "Bearer #{$acess_token}"
request["Dropbox-Api-Arg"] = "{\"path\":\"/Sass-for-Web-Designers.pdf\"}"
request.body = ""
request.body << File.open("app/assets/images/categoryImages/Sass-for-Web- Designers.pdf").read
#request.body << file.content
#file.close
> On Jan 25, 2017, at 7:00 AM, Paramnoor Singh <paramnoor.intersoft@gmail.com> wrote:
>
>
> Problem: I have use the net/http code for uploading the '.doc', '.docx', '.pdf' and images files on dropbox. But I getting the issues like:
>
> 1.invalid byte sequence in UTF 8
> 2. Now while the file is uploading but it not uploading the content and even it uploading as a corrupt file.
>
> Below I writing my code to upload the file on dropbox. Please help me.
>
> Code:
>
> uri = URI.parse("https://content.dropboxapi.com/2/files/upload")
> request = Net::HTTP::Post.new(uri)
> request.content_type = "application/octet-stream"
> request["Authorization"] = "Bearer #{$acess_token}"
> request["Dropbox-Api-Arg"] = "{\"path\":\"/Sass-for-Web-Designers.pdf\"}"
> request.body = ""
> request.body << File.open("app/assets/images/categoryImages/Sass-for-Web-Designers.pdf").read
This line is opening the file as a UTF-8 string, which it most likely is not. Read up on File.open, particularly the various flags you can pass to it to ensure that the file is being opened as a binary, not a text file.
Walter
> #request.body << file.content
> #file.close
>
Problem: I have use the net/http code for uploading the '.doc', '.docx', '.pdf' and images files on dropbox. But I getting the issues like:
1.invalid byte sequence in UTF 8
2. Now while the file is uploading but it not uploading the content and even it uploading as a corrupt file.
Below I writing my code to upload the file on dropbox. Please help me.
Code:
uri = URI.parse("https://content.dropboxapi.com/2/files/upload")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/octet-stream"
request["Authorization"] = "Bearer #{$acess_token}"
request["Dropbox-Api-Arg"] = "{\"path\":\"/Sass-for-Web-Designers.pdf\"}"
request.body = ""
request.body << File.open("app/assets/images/categoryImages/Sass-for-Web-Designers.pdf").read
#request.body << file.content
#file.close
Paz e bem!
Eu sou novo no framework Ruby on Rails e consegui alguns projetos.
Queria pedir ajuda no valor a ser cobrado por este projeto que envolve:
-Engenharia de Software
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/86c0a75c-a5ff-409a-9e2f-5c6e2fbfacf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BfXU%2B0_CoQ5UA3Hk%2BUaPr24OJd%2BRSUiz43KO-sWiF29N6PMLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Blog Archive
- August 2024 (1)
- April 2024 (1)
- July 2023 (1)
- February 2023 (38)
- November 2021 (1)
- January 2021 (1)
- December 2020 (1)
- March 2020 (49)
- February 2020 (59)
- January 2020 (109)
- December 2019 (130)
- November 2019 (77)
- October 2019 (106)
- September 2019 (66)
- August 2019 (96)
- July 2019 (27)
- June 2019 (52)
- May 2019 (51)
- April 2019 (53)
- March 2019 (115)
- February 2019 (153)
- January 2019 (222)
- December 2018 (155)
- November 2018 (104)
- October 2018 (164)
- September 2018 (89)
- August 2018 (209)
- July 2018 (126)
- June 2018 (171)
- May 2018 (80)
- April 2018 (81)
- March 2018 (126)
- February 2018 (161)
- January 2018 (153)
- December 2017 (55)
- November 2017 (53)
- October 2017 (96)
- September 2017 (250)
- August 2017 (99)
- July 2017 (253)
- June 2017 (175)
- May 2017 (94)
- April 2017 (140)
- March 2017 (126)
- February 2017 (148)
- January 2017 (80)
- December 2016 (116)
- November 2016 (56)
- October 2016 (105)
- September 2016 (38)
- August 2016 (100)
- July 2016 (173)
- June 2016 (192)
- May 2016 (177)
- April 2016 (211)
- March 2016 (318)
- February 2016 (269)
- January 2016 (346)
- December 2015 (363)
- November 2015 (380)
- October 2015 (269)
- September 2015 (365)
- August 2015 (287)
- July 2015 (539)
- June 2015 (430)
- May 2015 (337)
- April 2015 (453)
- March 2015 (350)
- February 2015 (386)
- January 2015 (436)
- December 2014 (431)
- November 2014 (371)
- October 2014 (319)
- September 2014 (423)
- August 2014 (475)
- July 2014 (505)
- June 2014 (444)
- May 2014 (601)
- April 2014 (489)
- March 2014 (486)
- February 2014 (396)
- January 2014 (429)
- December 2013 (323)
- November 2013 (371)
- October 2013 (488)
- September 2013 (438)
- August 2013 (442)
- July 2013 (651)
- June 2013 (557)
- May 2013 (751)
- April 2013 (582)
- March 2013 (775)
- February 2013 (588)
- January 2013 (697)
- December 2012 (682)
- November 2012 (830)
- October 2012 (879)
- September 2012 (1091)
- August 2012 (851)
- July 2012 (872)
- June 2012 (874)
- May 2012 (845)
- April 2012 (979)
- March 2012 (1003)
- February 2012 (1272)
- January 2012 (1291)
- December 2011 (1184)
- November 2011 (1160)
- October 2011 (1107)
- September 2011 (1184)
- August 2011 (1451)
- July 2011 (1313)
- June 2011 (1174)
- May 2011 (1351)
- April 2011 (1364)
- March 2011 (1429)
- February 2011 (1332)
- January 2011 (1427)
- December 2010 (1464)
- November 2010 (1456)
- October 2010 (1460)
- September 2010 (1467)
- August 2010 (1496)
- July 2010 (1500)
- June 2010 (1411)
- May 2010 (1418)
- April 2010 (1054)