Last active
June 20, 2016 08:38
-
-
Save MaksimAbramchuk/9b1d14786e082858dba15db2578ea44b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
validates_uniqueness_of :telegram_id | |
def set_next_bot_command(command) | |
self.bot_command_data[‘command’] = command | |
save | |
end | |
def get_next_bot_command | |
bot_command_data[‘command’] | |
end | |
def reset_next_bot_command | |
self.bot_command_data = {} | |
save | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment