why not using an idiom like this DataMapper.repository( current_user.repository.to_sym ) do
# do what ever stuff you want to do for that user end assuming the current_user does carry such profile into about the repository. in rails you probably can but it into an around_filter. hope that helps !? regards, Christian On Sat, Mar 2, 2013 at 6:31 PM, André Lima <andrelimasi...@gmail.com> wrote: > Hi friend, > > Can anyone help me in this problem? > > Thanks > > Andre Lima > > > On Fri, Mar 1, 2013 at 10:35 AM, André Lima <andrelimasi...@gmail.com> > wrote: >> >> Friends, >> >> I have a app in Rais 3 with the user can select which repository will be >> used to work. >> >> Exemple: >> >> The user X access the app with :default repository, and in app he have a >> form to select which repository will work. >> >> I need set the repository selected as default in all app! >> >> This is possible? >> >> I tried DataMapper::Repository.context << >> repository(:repository_selected), but the next request back to the default >> repository >> >> Thanks >> >> Andre Lima >> >> -- >> You received this message because you are subscribed to the Google Groups >> "DataMapper" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to datamapper+unsubscr...@googlegroups.com. >> To post to this group, send email to datamapper@googlegroups.com. >> Visit this group at http://groups.google.com/group/datamapper?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > > > > -- > Atenciosamente, > > André Lima > > -- > You received this message because you are subscribed to the Google Groups > "DataMapper" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to datamapper+unsubscr...@googlegroups.com. > To post to this group, send email to datamapper@googlegroups.com. > Visit this group at http://groups.google.com/group/datamapper?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To unsubscribe from this group and stop receiving emails from it, send an email to datamapper+unsubscr...@googlegroups.com. To post to this group, send email to datamapper@googlegroups.com. Visit this group at http://groups.google.com/group/datamapper?hl=en. For more options, visit https://groups.google.com/groups/opt_out.