Giter VIP home page Giter VIP logo

sinatra-blog's People

Contributors

jasonknebel avatar

Watchers

 avatar  avatar  avatar

sinatra-blog's Issues

Single Post View

Where a post is truncated, add a link to view the entire post in it's own page.

Increase modularity!

It looks like the main app file pretty much houses all the functionality (router, database config, etc.) - perhaps it would be cleaner to separate out these components and require them in

Truncate content in admin panel

It might be easier just to see a small snippet of the text rather than the entire post in the admin index view. Rails' truncate method is a good way to deal with this, although you might have to port it in to sinatra in order to get it working : )

Add ID to seo title url?

If there are two posts with the same :url, the system will just return back the first one it finds.

Parse Heroku DB info

Get URI to parse the database_url that can be seen with heroku config. Otherwise, the information has to be manually entered for each different application.

require 'active_record'
require 'uri'

db = URI.parse(ENV['DATABASE_URL'] || 'postgres://localhost/mydb')

ActiveRecord::Base.establish_connection(
  :adapter  => db.scheme == 'postgres' ? 'postgresql' : db.scheme,
  :host     => db.host,
  :port     => db.port,
  :username => db.user,
  :password => db.password,
  :database => db.path[1..-1],
  :encoding => 'utf8'
)

https://devcenter.heroku.com/articles/rack#database-access

Edit published posts?

Should the admin be able to edit published posts?

Currently, the admin is not able to.

pagination

Pagination on both the index and admin pages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.