How to manage multiple Rails applications [closed] - ruby-on-rails

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
What is the best way to manage multiple Rails applications?
I heard Rack is a good tool to use and I was wondering if all Rails apps can share the same session so the users don't have to login twice.
I'm also using EmberJS aswell.

If you're using token-based authentication, you can maintain a single database table for the user model across both apps (have them both connect to the same database, prefix all tables for app 1 with app1_ and for app 2 with app2_, except for the User table which is unprefixed).
To prefix all the tables for one app, you can set
config.active_record.table_name_prefix = "app1_"
in the environments.rb file of app 1, and
config.active_record.table_name_prefix = "app2_"
in the environments.rb file of app 2.

Related

Adding a two way authorization in a Ruby on Rails application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to add a two way authorization in my ruby app, just like freelancer has for work and hire. Is there an easy way to do this. In my app there will be two types of users buyer and seller. Seller will have the power to post adds and buyer can bid on them. that's all
For authentication purpose, you can use Devise and for roles (buyer/seller or client/freelancer) management, you have CanCan
You can refer to this tutorial:
Rails Authentication with Devise & CanCan

Integrating Instagram API With Rails [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm very new to rails and have very little experience with programming in general. I was given the project of creating a simple rails app that is able to check a users Instagram when given their User ID and Password. My question in general is how do I approach this? Where do I start and essentially how do I do this?
Well, you should never ask for the user's password for an external service (no sane user will give it to you). Instead use omniauth (omniauth-instagram, specifically) to get an access_token and then simply use the Instagram ruby gem (https://github.com/Instagram/instagram-ruby-gem) to get their timeline.

Whats the best database for iphone apps [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
i just started coding iPhone apps on xcode and i was curious what is the best database to use? For example a database to store names emails etc, to make a sign up and login page.
Cheers
If you are talking about storing a database local to your device, coredata is the standard: https://developer.apple.com/library/mac/documentation/cocoa/conceptual/coredata/cdProgrammingGuide.html
Small amounts of data can be persisted using user defaults: https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSUserDefaults_Class/Reference/Reference.html
When you said the words "sign up and login page," I suppose you are talking about an online database.
Use Parse.com's BaaS (backend as a service). Its also super easy to implement. Here is a tutorial from them talking about how to make a sign in/sign up page.
Keep in mind, there are other Baas like Kinvey and StorageRoom which are also good as well.

PrestaShop import items to show in iOS application [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have a new project in which I need to work on PrestaShop and create a universal mobile application. I am not getting anything anywhere about how you use it in an iOS application to get the items in different categories, Search API for items, etc.
PrestaShop implements a full-featured RESTful web service.
You need to enable the web service in Advanced Parameters > Web Service, then to use the guides and how-to located at http://doc.prestashop.com/display/PS15/Using+the+PrestaShop+Web+Service
You also have an example library on github: https://github.com/PrestaShop/PrestaShop-webservice-lib

A tool to browse my rails app's database? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want a way to comprehensively view:
1. what's going on in my database
2. what the schema looks like
Is there a good tool that lets you do that?
There's a gem Active Admin that lets you do that: http://activeadmin.info/documentation.html
And of course you can use any other Administration tool that lets you connect to your database, for instance Squirrel http://squirrel-sql.sourceforge.net/ which connects to various sql databases, sqlite among them.
For development and testing, I would say the preferred way of knowing your data is generating it automatically using tools like FactoryGirl or Faker and look into schema.rb for the schema.

Resources