fajrif / has_mailbox Goto Github PK
View Code? Open in Web Editor NEWcreate simple mailbox for Rails 3, enable user to send messages across the app.
create simple mailbox for Rails 3, enable user to send messages across the app.
will_paginate is not loaded through the dependency on has_mailbox. Accessing the mailboxes route results in this error message:
undefined method `paginate' for []:ActiveRecord::Relation
Adding will_paginate to the host application Gemspec fixes this error. Not sure if this is a will_paginate error or not, however the README should be updated to include this step to avoid this.
undefined method `paginate' for []:ActiveRecord::Relation
Started GET "/mailboxes" for 192.168.1.252 at Fri Oct 21 20:43:53 -0500 2011
Processing by MailboxesController#index as HTML
User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
HasMailbox::Models::Message Load (0.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."received_messageable_id" = 1 AND "messages"."received_messageable_type" = 'User' AND "messages"."deleted" = 'f' ORDER BY created_at desc
Completed 500 Internal Server Error in 35ms
NoMethodError (undefined method `paginate' for []:ActiveRecord::Relation):
Rendered /var/lib/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms)
Rendered /var/lib/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
Rendered /var/lib/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (5.0ms)
after sending message it automatically log-off the user
After installation got the file 'method_helpers.rb' with incorrect syntax. I guess it has something to do with 'class_eval'.
I have a problem with sending messages to the user.
After entering the name in the users and try to send I get the error "Could not find User with id = 0" But if I type a specific user id, the message is sent.
When I write the letter and then I come back to page back that I see the following
$("#tabs-messages").html("\n<form accept-charset="UTF-8" action="/mailbox/update?locale=ru" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="โ" /><input name="authenticity_token" type="hidden" value="l5TtQwhQY8/fRNRLJWWDQhZB86rSS/PP58xLSHFqED4=" /></div>\n <select id="option" name="option"><option value="Read">Read</option>\n<option value="Unread">Unread</option>\n<option value="Delete">Delete</option></select>\n <input class="submit" name="commit" type="submit" value="Apply to Selected" />\n <input id="mailbox" name="mailbox" type="hidden" value="inbox" />\n <table cellspacing="0" cellpadding="0" border="0" width="100%">\n \n \n <th width="5%" scope="col"><input type="checkbox" class="checkall" id="checkbox" name="checkbox"></th>\n <th width="20%" scope="col">From</th>\n <th width="55%" scope="col">Subject</th>\n <th width="20%" scope="col">Date</th>\n </tr>\n \n <tr class="">\n <td scope="col"><input id="messages" name="[messages][]" type="checkbox" value="7" /></td>\n <td scope="col">[email protected]</td>\n <td scope="col"><a href="/mailbox/show/inbox/7?locale=ru">zszeze</a></td>\n <td scope="col" title='Fri, Sep 23, 2011 at 06:44 AM'>06:44 AM</td>\n </tr>\n \n <td colspan="4"></td>\n </tr>\n </tbody> \n </table>\n</form>
\n <a href="/mailbox/new?locale=ru">Compose New Message</a>\n</p>\n");
how to Creating has_mailbox method in user model?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.