Wednesday, 5 February 2014

WDI Progress Update - Production, Bootstrap, CSV migrations

  • App exploded when tried to install bootstrap, used Heroku clone to recover
  • Searching databases and filtering selections
  • Resolved absolute file paths not being recognised when uploading to Heroku. Fixed data migration files and relocated CSV files to the root directory. Compiled successfully with this code:
require 'fileutils'require 'csv' 
class AddIdeaData < ActiveRecord::Migration
  def up
filepath = Rails.root.join("ideas.csv")
# locate the csv file in your /public folder if File.exist?(filepath) CSV.foreach(filepath)do |col| Idea.create(:name => col[0].to_s, :description => col[1].to_s, :author => col[6].to_s, :url => col[7].to_s, :country => col[8].to_s) end else  raise "No file exists with name: #{filepath}" end  end
  def down   Idea.all.destroy # only with team permission  end

                                                Progress @ General Assembly (GA):
                                                • Rails (Authentication vs Authorisation, Static page controller, Custom controller methods using routing collections and members, Hidden form fields)
                                                • Production (Heroku)
                                                • Gems (Sanitise for customising Devise Authentication, Rails_12factor for production and images on Heroku)
                                                • Agile (Daily Scrum meetings)
                                                • Bootstrap themes

                                                Contributions to Developer Community 
                                                • Exciting ideas and concepts explored with the The Slippery Gypseas!
                                                • Sydney Tech Startup Meetup on 6th Feb

                                                • Cancan (Authorisation)

                                                No comments:

                                                Post a Comment