suhrawardi / memorizr

An open source app to archive, share and discuss quotes, notes and attachments.
1 stars 2 forks source link

Add show-page, edit profile page and list all users with pagination #10

Open AkshataDM opened 10 years ago

AkshataDM commented 10 years ago

Added an action to show users profile, action to edit profile page and list all users with pagination. Also a show page to show users profile with avatar, edit their profile page and list all users page.

AkshataDM commented 10 years ago

Hey, I'm getting a " Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) " when i try to run on my local server. Is this some path error of mysql that should be taken care of database.yml ?

AkshataDM commented 10 years ago

In the user profile page, apart from the mandatory gravatar and name, should it list out the user quotes and notes too? What are folders and units of a user?

AkshataDM commented 10 years ago

Oh is a user unit where a quote and notes of a user is in?

suhrawardi commented 10 years ago

And if you remove the line /tmp/mysql.sock from database.yml? What OS are you using? Do you have the database and the correct credentials set up in the database.yml file?

There currently is a user's page where all units (notes, quites etc) of a user are displayed. It would be good to add a user profile on top of that page I think.

A user has units, and a unit can be a quote, note or attachment. (It uses Single Table Inheritance). You can fetch them with:

@user.units

Which will return a list of the user's quotes, notes and attachments.

HTH

AkshataDM commented 10 years ago

If I remove that line from database.yml, i get a "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'" error. I use fedora

suhrawardi commented 10 years ago

Think that you should remove the line, and specify a hostname (=localhost), user and password.. Are you sure that the user and password have the correct permissions?

AkshataDM commented 10 years ago

Phew! Finally got it running ! I changed mysql2 gem to sqlite3 gem!

AkshataDM commented 10 years ago

Yep I'll try what you suggested too :)

suhrawardi commented 10 years ago

Hmm, weird... Shouldn't be that difficult to get it up and running with Mysql...

What if you run the following in Bash:

mysqladmin variables | grep socket