Creating a marketing front for Rails app - ruby-on-rails

I started to get comfortable with Rails and programming in general. I'm working on a Rails app with basic authorization and authentication. I wish to have a CMS for the landing page, while the core functionality of the website would be in Rails. I've seen that it's very useful to separate the marketing assets from the core app for iterating on the messaging and other content.
My plan is for the landing page to have 3 fields for the signup- Username, email and password, for new users to fill in, which should then be stored in the database and used by the Rails app behind the landing page. I'm thinking of using Wordpress to do so, simply because that's the only CMS I'm comfortable with.
I was wondering how I should go about this? Is this recommended, and if so, would the necessary way to go about it be a Wordpress plugin? (I couldn't narrow it down to a good Rails plugin, so any suggestions would be greatly appreciated) . Are there any alternatives to plugins? Thanks in advance!

Why not using devise gem? Everyone uses that. Its well tested and has tons of useful features. And if its a small app, your own created authentication system might be enough.
And for CMS I would like Wordpress for SEO purposes, and Rails Frog for ease of use

You could use Refinery CMS with or without the Rest API:
http://www.refinerycms.com/
http://www.refinerycms.com/guides/with-an-existing-rails-app
https://github.com/refinerycms-contrib/refinerycms-api

Related

How do I let clients edit the page if I created website using react and rails

I have been learning to create websites and very new to react and rails and like the combination between the two so far. So I was wondering what would I have to do to let clients edit the page contents without any coding knowledge. I watched some CMS tutorial videos and saw people using wordpress to achieve this. But I think you would have to have written your website using PHP to use wordpress as a CMS right? Please correct me if I am mistaken. And please suggest any CMS for rails and react. Thank you.
You might want to take a look at our Rails based CMS Scrivito: https://scrivito.com/ - which has also support for JS customiziation.

Rails/Refinery CMS: Adding to existing application + modifying existing code via CMS

I've been reading the documentation on Refinery CMS but I haven't seemed to come across the right answer yet. If you have an existing Ruby on Rails application, is there a way to add Refinery to it and then run a command so that your previous models become refinery compatible, that is, you design a page and then it becomes editable in the refinery editors?
I'm asking because I'm planning on designing a website for a non-profit that does not have the resources for paid web developers. Is it possible for one web developer to write out the code and then have it all be editable by the editor? Does anyone have any experience with this? Thank you in advance.
If you have an existing Ruby on Rails application
You can add Refinery CMS in an existing Rails application:
http://www.refinerycms.com/guides/with-an-existing-rails-app
run a command so that your previous models become refinery compatible, that is, you design a page and then it becomes editable in the refinery editors
No, you will have to manually convert this models.
I'm asking because I'm planning on designing a website for a non-profit that does not have the resources for paid web developers. Is it possible for one web developer to write out the code and then have it all be editable by the editor? Does anyone have any experience with this? Thank you in advance.
Why don't you use a static website generator like middleman or Jekyll ? And choose a Headless/Decoupled CMS like Contentful.
Refinery CMS will soon be able to use it like a Headless CMS but it needs more work to do that:
https://github.com/refinerycms-contrib/refinerycms-api
https://github.com/refinerycms-contrib/refinerycms-api-wrapper
https://github.com/refinerycms-contrib/refinerycms_middleman

How to manage static content in a rails app

I'm running a rails app for interactive learning for kids. We also have quite a few static pages like, landing pages, team pages, case studies etc. This is also deployed in the same rails app.
I would like a easy way for my team to manage the content without depending on the tech team. I can build an admin interface to edit these pages, but I don't want to recreate a CMS. I checked out Jekyll but the markdown syntax makes some tech novices uneasy.
Someone suggested using weebly/ wordpress and host it in a subdomain. I don't want to go overboard and add an additional layer of maintenance to the app.
I've a mongoid project and would appreciate any mongoid gems.
RefineryCMS is a popular content management solution for Rails apps. You can add it to your existing Rails app, as described in the guide. RefineryCMS is targeted at the end user experience, you don't need extensive technological knowledge to use it.
There's an online demo of the CMS which you can find here. You don't have to edit the pages using Markdown, it has a WYSIWYG (What You See Is What You Get) editor as well.
If you're looking for another CMS, you can find other solutions quite easily with the Ruby Toolbox.

Intergrating Angular JS with rails

I need some guidance to figure out how to incorporate Angular inside rails.
Reason for choosing Rails : I like their opionated approach to do things right. Also migrations, gems are really cool.
Reason for angular : I was researching and looking for framework best suited for SPA. Backbone seem too abstract. I had choice to make between Angular & Ember. I started reading Angular first and it made sense to me. So i never went to read about ember.
Reason for Angular & Rails: I researched and tried using small scale framework like grape, slim ( Yes i use php too ). But i feel need to stick to rails for long term scope of project. And personally i like doing things rails way.
So here is where i need help,
I have rails project in Rails 4.
Sign-in , sign-up everything is created as followed in Michael Hartl tutorial. Have tweaked stuff based on my requirement.
So post-sign-in or post-sign-up steps a view from show action of users controller is rendered.
I figured i'll need different layout files so i created same for outer pages and inner pages, respectively.
I don't know how to proceed i want to make use of the angular templates and routes for my single page app ( which resides post sign-in ). I am flexible if there is another way. I just need a guide how to use angular seemlessly with rails making use of rails controller to handle my rest request and using routing provided by angular to navigate around in SPA.
Hope i am clear. Feel free to edit this.
here is a great railscasts from ryan bates: http://railscasts.com/episodes/405-angularjs
also here is the source for that railscasts you can get ideas from there:
https://github.com/railscasts/405-angularjs
I'm not familiar with SPA, but I have been working on a tutorial for integrating rails and angularjs, which I'm refining over time. It may provide some answers here - in particular I am using the angular routing to provide a single-page app as you describe: http://technpol.wordpress.com/2013/09/03/angularjs-and-rails-tutorial-index/
I would suggest you to not mix angular into your rails app. Keep both of them separate.
So you could either place the whole of your angular app in the public folder of your rails app or keep it completely away from the rails app. This is more like a service oriented architecture, where your rails app serves as a back end serving as an api and the front end(Angular app) consuming that api.
There are many many nice articles the covers how to handle the authentication/authorization
in angularjs with REST APIs.Authentication with AngularJS and a Node.js REST api
Coming to the rails side for building REST API, Grape is a nice choice. Here is a nice series explaining some best practices about grape.
HTH!
I'd suggest taking a look at this tutorial: How to Wire Up Ruby on Rails and AngularJS as a Single-Page Application. I have used it for a few personal projects, so I am sure that it is up to date as of late 2014. If you want to view it in action you can head to http://goodmatches.herokuapp.com, and you can view the repo.
Try half-pipe gem which makes using bower for managing javascripts assets much easier.

Ruby on Rails integrated with Wordpress site

I'm working on an Ruby on Rails exercise listing application (https://rbzexercise.herokuapp.com) and I'm trying to integrate it with a Wordpress site (http://www.rubberbanditz.com). Is there an easy way to do the integration? As you can see, both are pretty established, so I'd really prefer not to have to rewrite either. Right now i'm using a work around that involves an iframe within the page http://rubberbanditz.com/exercise-library/, but we don't get any of the "google juice" from it.
Update:
Based on the comments, I've started looking into integrating the app to exercise.rubberbanditz.com, but following the directions at https://devcenter.heroku.com/articles/custom-domains doesn't seem to be doing the job. when going to exercise.rubberbanditz.com i just automatically get forwarded to the main page. Does anyone have any experience with setting a rails app to a subdomain, and can you point me to a good tutorial?
Thanks for any help!
Jason
Your iframe method is fine, but might lead to seo problems, since all of your links are trapped in the iframe.
Another option would be to take your WordPress theme and rebuild it in your /app/views/layouts/application.html.erb template. Once that's done, make a subdomain (maybe app.rubberbanditz.com or workouts.rubberbanditz.com) and setup your heroku app to use the new subdomain.
Google should view the two subdomains as the same website, especially if you're sharing common navigation elements, and both sites link to each other frequently.
The biggest downside is that now you'll have to update your design in two different places, which can be a huge pain in the ass.
I've used this approach before, running-php-inside-a-rails-app, for running php inside a rails application. Not sure if anything extra will be required for wordpress since I was just rendering a single page.

Resources