• May 3, 2015 - admin

    Custom Layout for Devise

    Custom Layout in Devise, devise is an awesome gem that provides the quick and easy way for the rails app to have user authentication. But you may be face with the need to add a custom layout to devise. There’s a couple of ways of doing so, but today I am going with the easiest […]

    Read More
  • Introduction Layout in ruby on rails provide the flexibility to allow different views to come together and render as a page. Think iFrame but we without the cross-domain issue. Layout are located in your project, app\views\layouts, by default you will only have application.html.erb Layout will always have the  <%= yield %> tag, this will render […]

    Read More
  • There’s a lot of requests to remove the 512MB on the private own cloud server. Follow the following documentation should get everyone sorted out. https://doc.owncloud.org/server/7.0/admin_manual/configuration/big_file_upload_configuration.html  

    Read More
  • February 7, 2015 - admin

    Bootply.com

    Today, was doing some boostrapping design, but as usual i am not very good at it. Chance upon the following site, allow you to leverage the community created stuff, which is very cool. They also have an in-browser editor. Check them out! http://www.bootply.com/tagged/responsive

    Read More
  • We are going to create the following in this tutorial: Ticket Model Ticket Controller Ticket Views Here we going to take the easy way out by having rails generate all the above for us, using a single command. 1. Open Terminal and key the following: -> rails g scaffold Ticket ticketnumber:integer ticketTitle:string ticketDescription:string status:string date:datetime […]

    Read More
  • From the start of this year, I will try to start writing more tutorial post instead of snippet of technology post. For a start, I will be talking about the recent Support Ticket System that I build on Rails. Duration: 30 mins Let’s create a new Rails application. 1. Open up Terminal, enter the following […]

    Read More
  • January 4, 2015 - admin

    WildCard Search in Ruby on Rails

    Wildcard Search Assuming that you have you have the following model: Model : Book Fields:  BookName Author PublishedDate Edition Typical, when you try to do a wildcard search you will do the following code below: Book.where(“BookName LIKE ‘%#{BookNameInput}%’) The above returns the following in terms of SQL -> SELECT “Books”.* FROM “Books” WHERE (BookName LIKE […]

    Read More
  • class AuthenticationsController < ApplicationController def create auth = request.env[“omniauth.auth”] user = User.find_by_provider_and_uid(auth[“provider”], auth[“uid”]) || User.create_with_omniauth(auth) sign_in_and_redirect(:user, user) end end   Add the line in bold to redirect!

    Read More
  • If you are using Devise as the authentication for your Ruby On Rails application and you are looking to implement OmniAuth, that allow the users to login with their Facebook or Google Account. But once you have all the codes and omniauth setup, on creation you will hit the following error: Validation Failed: Email and […]

    Read More
  • To load data via Ruby On Rails: 1. Create this a file name “import.rake” in the following location: App -> Lib -> Tasks 2. Place your CSV file in the following location: Public -> SeedData (create this folder) 2. This are the codes that should be in the import.rake files, note that the row[1] is […]

    Read More
1 2 3 6